Kaydet (Commit) 18e48959 authored tarafından Petr Mladek's avatar Petr Mladek

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
üst 8f42220c
...@@ -2865,7 +2865,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar( ...@@ -2865,7 +2865,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
} }
else if( nPart == PART_SEPARATOR_HORZ || nPart == PART_SEPARATOR_VERT ) 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, gtk_widget_style_get (gWidgetData[m_nXScreen].gSeparator,
"wide-separators", &wide_separators, "wide-separators", &wide_separators,
...@@ -2873,8 +2876,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar( ...@@ -2873,8 +2876,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
"separator-height", &separator_height, "separator-height", &separator_height,
NULL); NULL);
const double shim = 0.2;
if (wide_separators) if (wide_separators)
{ {
if (nPart == PART_SEPARATOR_VERT) if (nPart == PART_SEPARATOR_VERT)
...@@ -2891,6 +2892,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar( ...@@ -2891,6 +2892,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar(
w * (1 - 2*shim), separator_width); w * (1 - 2*shim), separator_width);
} }
else else
#endif
{ {
if (nPart == PART_SEPARATOR_VERT) if (nPart == PART_SEPARATOR_VERT)
gtk_paint_vline (gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable, gtk_paint_vline (gWidgetData[m_nXScreen].gSeparator->style, gdkDrawable,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment