diff options
author | Petr Mladek <pmladek@suse.cz> | 2012-07-10 15:15:45 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-07-10 15:27:36 +0200 |
commit | 18e48959de7774f0e2bf194594809b74ee26ab93 (patch) | |
tree | 4311b4b2589bb0b2f7f6640f9517412938f0b4e5 /vcl | |
parent | 8f42220c6dfc49268f7e1b460a48d9f3d340c40b (diff) |
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
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 7735a7442865..96b702bd1241 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, |