From: Robert Roebling Date: Fri, 15 Sep 2000 11:13:06 +0000 (+0000) Subject: Notebook theme attampt. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/789dbcd4e35cdab7085c6f15c2cb10615cdb3624 Notebook theme attampt. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 5288cfcfd8..1bd4d35d83 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -683,8 +683,17 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev if (win->IsTopLevel()) { - gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, - GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1); + gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1); + } + + wxWindow *parent = win->GetParent(); + if (parent && GTK_IS_NOTEBOOK(parent->m_widget)) + { + while (!parent->IsTopLevel()) + parent = parent->GetParent(); + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); } win->GetUpdateRegion().Union( gdk_event->area.x, @@ -789,6 +798,15 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1); } + wxWindow *parent = win->GetParent(); + if (parent && GTK_IS_NOTEBOOK(parent->m_widget)) + { + while (!parent->IsTopLevel()) + parent = parent->GetParent(); + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, rect, parent->m_widget, "base", 0, 0, -1, -1); + } + if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && (pizza->clear_on_draw)) { diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 5288cfcfd8..1bd4d35d83 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -683,8 +683,17 @@ static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_ev if (win->IsTopLevel()) { - gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, - GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1); + gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1); + } + + wxWindow *parent = win->GetParent(); + if (parent && GTK_IS_NOTEBOOK(parent->m_widget)) + { + while (!parent->IsTopLevel()) + parent = parent->GetParent(); + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, &gdk_event->area, parent->m_widget, "base", 0, 0, -1, -1); } win->GetUpdateRegion().Union( gdk_event->area.x, @@ -789,6 +798,15 @@ static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxW GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1); } + wxWindow *parent = win->GetParent(); + if (parent && GTK_IS_NOTEBOOK(parent->m_widget)) + { + while (!parent->IsTopLevel()) + parent = parent->GetParent(); + gtk_paint_flat_box (parent->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL, + GTK_SHADOW_NONE, rect, parent->m_widget, "base", 0, 0, -1, -1); + } + if (!(GTK_WIDGET_APP_PAINTABLE (widget)) && (pizza->clear_on_draw)) {