#define WXUNUSED_IN_GTK1(arg)
#endif
+// RR: After a correction to the orientation of the sash
+// this doesn't seem to be required anymore and it
+// seems to confuse some themes so USE_ERASE_RECT=0
+#define USE_ERASE_RECT 0
+
// ----------------------------------------------------------------------------
// wxRendererGTK: our wxRendererNative implementation
// ----------------------------------------------------------------------------
state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;
-
+
// VZ: I don't know how to get the size of the expander so as to centre it
// in the given rectangle, +2/3 below is just what looks good here...
gtk_paint_expander
gint handle_size;
gtk_widget_style_get (s_paned, "handle_size", &handle_size, NULL);
-
+
return handle_size;
#else
return SASH_SIZE + SASH_MARGIN;
// window not realized yet
return;
}
-
+
wxCoord full_size = GetGtkSplitterFullSize();
// are we drawing vertical or horizontal splitter?
const bool isVert = orient == wxVERTICAL;
GdkRectangle rect;
+#if USE_ERASE_RECT
GdkRectangle erase_rect;
+#endif
+
if ( isVert )
{
int h = win->GetClientSize().GetHeight();
rect.width = full_size;
rect.height = h;
+#if USE_ERASE_RECT
erase_rect.x = position;
erase_rect.y = 0;
erase_rect.width = full_size;
erase_rect.height = h;
+#endif
}
else // horz
{
rect.height = full_size;
rect.width = w;
+#if USE_ERASE_RECT
erase_rect.y = position;
erase_rect.x = 0;
erase_rect.height = full_size;
erase_rect.width = w;
+#endif
}
-#if 0
- // RR: After a correction to the orientation of the sash
- // this doesn't seem to be required anymore and it
- // seems to confuse some themes
-
+#if USE_ERASE_RECT
// we must erase everything first, otherwise the garbage
// from the old sash is left when dragging it
gtk_paint_flat_box
GtkStateType state;
- if ( flags & wxCONTROL_CURRENT )
- state = GTK_STATE_PRELIGHT;
+ if ( flags & wxCONTROL_PRESSED )
+ state = GTK_STATE_ACTIVE;
else if ( flags & wxCONTROL_DISABLED )
state = GTK_STATE_INSENSITIVE;
+ else if ( flags & wxCONTROL_CURRENT )
+ state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;
// draw button
GtkStateType state;
- if ( flags & wxCONTROL_CURRENT )
- state = GTK_STATE_PRELIGHT;
+ if ( flags & wxCONTROL_PRESSED )
+ state = GTK_STATE_ACTIVE;
else if ( flags & wxCONTROL_DISABLED )
state = GTK_STATE_INSENSITIVE;
+ else if ( flags & wxCONTROL_CURRENT )
+ state = GTK_STATE_PRELIGHT;
else
state = GTK_STATE_NORMAL;