Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

Here is a patch to fix gtk toggle buttons, and it cleans up the code a
little too.

"togglebutton" detail is not standard, and caused some bugs with the
Ambiance theme, see this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=33473
and this page to check the standard details name:
https://webstats.gnome.org/GTK%2B/ThemingInternals
(GtkToggleButton is a subclass of GtkButton)

Lucas
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 3d56218..f94a9e3 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2516,7 +2516,6 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
     gint            g_x=0, g_y=0, g_w=10, g_h=10;
     bool            bPaintButton = true;
     GtkWidget*      pButtonWidget = gWidgetData[m_nScreen].gToolbarButtonWidget;
-    const gchar*    pButtonDetail = "button";
     GdkRectangle       clipRect;
 
     NWEnsureGTKToolbar( m_nScreen );
@@ -2579,7 +2578,6 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
             // cf. gtk+/gtk/gtktogglebutton.c (gtk_toggle_button_update_state)
             if( ! (nState & (CTRL_STATE_PRESSED|CTRL_STATE_ROLLOVER)) )
                 stateType = GTK_STATE_ACTIVE;
-            pButtonDetail = "togglebutton";
             bPaintButton = true;
         }
 
@@ -2639,7 +2637,7 @@ BOOL GtkSalGraphics::NWPaintGTKToolbar(
                                stateType,
                                shadowType,
                                &clipRect,
-                               pButtonWidget, pButtonDetail, x, y, w, h );
+                               pButtonWidget, "button", x, y, w, h );
             }
         }
     }

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.