[Libreoffice-commits] .: Branch 'libreoffice-3-6' - vcl/unx

Petr Mladek pmladek at kemper.freedesktop.org
Tue Jul 10 06:32:35 PDT 2012


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

New commits:
commit 1d1a6411d69f300a864012e6b07ccf27551ff561
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 2b5d3c8..e1c8e2d 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -2871,7 +2871,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,
@@ -2879,8 +2882,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
                                       "separator-height", &separator_height,
                                       NULL);
 
-                const double shim = 0.2;
-
                 if (wide_separators)
                 {
                     if (nPart == PART_SEPARATOR_VERT)
@@ -2897,6 +2898,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