[Libreoffice-commits] .: vcl/unx

Petr Mladek pmladek at kemper.freedesktop.org
Tue Jul 10 06:29:58 PDT 2012


 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 18e48959de7774f0e2bf194594809b74ee26ab93
Author: Petr Mladek <pmladek at suse.cz>
Date:   Tue Jul 10 15:15:45 2012 +0200

    correctly paint toolbar separators with gtk-2.8 (bnc#770013)
    
    wide_separators = 0 would be enough because the value was not modified if the
    property did not exist.
    
    Anyway, I added also #if GTK_CHECK_VERSION(2,10,0) because it helps to avoid
    the GTK warning about non-existing property 'wide-separators'.
    
    Change-Id: If93928821d951dc15da967519cb207efdaa30cf7

diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 7735a74..96b702b 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2865,7 +2865,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
             }
             else if( nPart == PART_SEPARATOR_HORZ || nPart == PART_SEPARATOR_VERT )
             {
-                gint separator_height, separator_width, wide_separators;
+                const double shim = 0.2;
+
+#if GTK_CHECK_VERSION(2,10,0)
+                gint separator_height, separator_width, wide_separators = 0;
 
                 gtk_widget_style_get (gWidgetData[m_nXScreen].gSeparator,
                                       "wide-separators",  &wide_separators,
@@ -2873,8 +2876,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
                                       "separator-height", &separator_height,
                                       NULL);
 
-                const double shim = 0.2;
-
                 if (wide_separators)
                 {
                     if (nPart == PART_SEPARATOR_VERT)
@@ -2891,6 +2892,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
                                        w * (1 - 2*shim), separator_width);
                 }
                 else
+#endif
                 {
                     if (nPart == PART_SEPARATOR_VERT)
                         gtk_paint_vline (gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable,


More information about the Libreoffice-commits mailing list