summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-01-27 20:06:47 +0100
committerThomas Arnhold <thomas@arnhold.org>2012-01-28 11:05:48 +0100
commit8f2a08b9576a50b2046306132cb8cddcf876d0a4 (patch)
treebfdf0b04776f3fab63249b35eb8edef6581afd60 /vcl
parent9a7605b8f08dfcfbc99bc0c635014eac8e41e932 (diff)
GtkSalGraphics: No extra handling for Blueprint theme
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/gtk/gtkgdi.hxx3
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx52
2 files changed, 5 insertions, 50 deletions
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 878fa61c7f27..9f5c4dda2a9a 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -134,9 +134,6 @@ public:
// will be set when UI theme was changed
static sal_Bool bThemeChanged;
static sal_Bool bNeedPixmapPaint;
- static sal_Bool bGlobalNeedPixmapPaint;
- static sal_Bool bToolbarGripWorkaround;
- static sal_Bool bNeedButtonStyleAsEditBackgroundWorkaround;
// native widget methods
virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 686c7846f85e..a55d3f4f2ccf 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -50,9 +50,6 @@ typedef struct _cairo_font_options cairo_font_options_t;
// initialize statics
sal_Bool GtkSalGraphics::bThemeChanged = sal_True;
sal_Bool GtkSalGraphics::bNeedPixmapPaint = sal_False;
-sal_Bool GtkSalGraphics::bGlobalNeedPixmapPaint = sal_False;
-sal_Bool GtkSalGraphics::bToolbarGripWorkaround = sal_False;
-sal_Bool GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround = sal_False;
GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
: X11SalGraphics(),
@@ -451,12 +448,12 @@ void GtkData::initNWF( void )
// KDE 3.3 invented a bug in the qt<->gtk theme engine
// that makes direct rendering impossible: they totally
// ignore the clip rectangle passed to the paint methods
- GtkSalGraphics::bNeedPixmapPaint = GtkSalGraphics::bGlobalNeedPixmapPaint = true;
+ GtkSalGraphics::bNeedPixmapPaint = true;
}
}
static const char* pEnv = getenv( "SAL_GTK_USE_PIXMAPPAINT" );
if( pEnv && *pEnv )
- GtkSalGraphics::bNeedPixmapPaint = GtkSalGraphics::bGlobalNeedPixmapPaint = true;
+ GtkSalGraphics::bNeedPixmapPaint = true;
#if OSL_DEBUG_LEVEL > 1
std::fprintf( stderr, "GtkPlugin: using %s NWF\n",
@@ -777,7 +774,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType,
&& nType != CTRL_TAB_ITEM
&& nType != CTRL_TAB_PANE
&& nType != CTRL_PROGRESS
- && ! (bToolbarGripWorkaround && nType == CTRL_TOOLBAR && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
+ && ! (nType == CTRL_TOOLBAR && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
)
{
// make pixmap a little larger since some themes draw decoration
@@ -1948,21 +1945,13 @@ static void NWPaintOneEditBox( SalX11Screen nScreen,
if ( stateType == GTK_STATE_PRELIGHT )
stateType = GTK_STATE_NORMAL;
- // Blueprint needs to paint entry_bg with a Button widget, not an Entry widget to get
- // a nice white (or whatever default color) background
- GtkWidget* pBGWidget = widget;
- if( GtkSalGraphics::bNeedButtonStyleAsEditBackgroundWorkaround )
- {
- NWSetWidgetState( gWidgetData[nScreen].gBtnWidget, nState, stateType );
- pBGWidget = gWidgetData[nScreen].gBtnWidget;
- }
NWSetWidgetState( widget, nState, stateType );
/* This doesn't seem to be necessary, and it causes some weird glitch in
* murrine (with the elementary theme for instance) but it fixes some issue
* with Orta, so... */
- gtk_paint_flat_box( pBGWidget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
- gdkRect, pBGWidget, "entry_bg",
+ gtk_paint_flat_box( widget->style, gdkDrawable, stateType, GTK_SHADOW_NONE,
+ gdkRect, widget, "entry_bg",
aEditBoxRect.Left(), aEditBoxRect.Top(),
aEditBoxRect.GetWidth(), aEditBoxRect.GetHeight() );
gtk_paint_shadow( widget->style, gdkDrawable, GTK_STATE_NORMAL, GTK_SHADOW_IN,
@@ -3693,37 +3682,6 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// finally update the collected settings
rSettings.SetStyleSettings( aStyleSet );
-
- gchar* pThemeName = NULL;
- g_object_get( pSettings, "gtk-theme-name", &pThemeName, (char *)NULL );
- #if OSL_DEBUG_LEVEL > 1
- std::fprintf( stderr, "Theme name is \"%s\"\n", pThemeName );
- #endif
-
- // default behaviour
- bNeedPixmapPaint = bGlobalNeedPixmapPaint;
- bToolbarGripWorkaround = false;
- bNeedButtonStyleAsEditBackgroundWorkaround = false;
-
- // setup some workarounds for "blueprint" theme
- if( pThemeName && strncasecmp( pThemeName, "blueprint", 9 ) == 0 )
- {
- bNeedButtonStyleAsEditBackgroundWorkaround = true;
- if( GetGenericData()->GetSalDisplay()->GetServerVendor() == vendor_sun )
- {
- // #i52570#, #i61532# workaround a weird paint issue;
- // on a Sunray Xserver sometimes painting buttons and edits
- // won't work when using the blueprint theme
- // not reproducible with simpler programs or other themes
- if( pThemeName && strncasecmp( pThemeName, "blueprint", 9 ) == 0 )
- {
- bNeedPixmapPaint = true;
- bToolbarGripWorkaround = true;
- }
- }
- }
- // clean up
- g_free (pThemeName);
}