summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2012-07-10 15:15:45 +0200
committerPetr Mladek <pmladek@suse.cz>2012-07-10 15:31:43 +0200
commit1d1a6411d69f300a864012e6b07ccf27551ff561 (patch)
treef017901a125ae80226807d26db3d419a02b44acb
parent8c8f5b683d611d18ab8400c9fef67f50b1cf288f (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
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx8
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 2b5d3c8f8e33..e1c8e2d54403 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,