]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/renderer.cpp
check default library directories in WX_PATH_FIND_LIBRARIES; do *not* add default...
[wxWidgets.git] / src / gtk1 / renderer.cpp
index 67768b216c95d47f1a3137e6cf819657b0164610..7c0a375e803e904d49d93fefc9505c69c3aedff2 100644 (file)
     #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
 // ----------------------------------------------------------------------------
@@ -196,7 +201,7 @@ wxRendererGTK::DrawTreeItemButton(wxWindow* win,
         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
@@ -237,7 +242,7 @@ static int GetGtkSplitterFullSize()
 
     gint handle_size;
     gtk_widget_style_get (s_paned, "handle_size", &handle_size, NULL);
-      
+
     return handle_size;
 #else
     return SASH_SIZE + SASH_MARGIN;
@@ -282,14 +287,17 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
         // 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();
@@ -299,10 +307,12 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
         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
     {
@@ -313,17 +323,15 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
         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