summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx19
1 files changed, 17 insertions, 2 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 372d10fa5aaf..869189fb1415 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -45,6 +45,8 @@
#include "saldisp.hxx"
#include "vcl/svapp.hxx"
+typedef struct _cairo_font_options cairo_font_options_t;
+
// initialize statics
BOOL GtkSalGraphics::bThemeChanged = TRUE;
BOOL GtkSalGraphics::bNeedPixmapPaint = FALSE;
@@ -3469,12 +3471,25 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
// preferred icon style
gchar* pIconThemeName = NULL;
g_object_get( gtk_settings_get_default(), "gtk-icon-theme-name", &pIconThemeName, (char *)NULL );
- aStyleSet.SetPreferredSymbolsStyleName( OUString::createFromAscii(pIconThemeName) );
- g_free (pIconThemeName);
+ aStyleSet.SetPreferredSymbolsStyleName( OUString::createFromAscii( pIconThemeName ) );
+ g_free( pIconThemeName );
// FIXME: need some way of fetching toolbar icon size.
// aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_SMALL );
+ const cairo_font_options_t* pNewOptions = NULL;
+ if( GdkScreen* pScreen = gdk_display_get_screen( gdk_display_get_default(), m_nScreen ) )
+ {
+//#if !GTK_CHECK_VERSION(2,8,1)
+#if !GTK_CHECK_VERSION(2,9,0)
+ static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) =
+ (cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
+ if( gdk_screen_get_font_options != NULL )
+#endif
+ pNewOptions = gdk_screen_get_font_options( pScreen );
+ }
+ aStyleSet.SetCairoFontOptions( pNewOptions );
+
// finally update the collected settings
rSettings.SetStyleSettings( aStyleSet );