diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2016-04-13 13:56:53 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2016-04-13 13:56:53 +0000 |
| commit | dd318b73edb6989587be9f70f2ee6dacd5bd139b (patch) | |
| tree | 43ef8b8dbf5e14122c937df5a1467ff8bb3e7b74 /src/widgets/font-selector.cpp | |
| parent | Fix canvas flicker while dragging objects. #Hackfest2016 (diff) | |
| download | inkscape-dd318b73edb6989587be9f70f2ee6dacd5bd139b.tar.gz inkscape-dd318b73edb6989587be9f70f2ee6dacd5bd139b.zip | |
font-selector: Gtk+ 3 theming #Hackfest2016
(bzr r14830)
Diffstat (limited to 'src/widgets/font-selector.cpp')
| -rw-r--r-- | src/widgets/font-selector.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 943434868..aefcb2e81 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -159,9 +159,24 @@ static void sp_font_selector_init(SPFontSelector *fsel) /* Muck with style, see text-toolbar.cpp */ gtk_widget_set_name( GTK_WIDGET(fsel->family_treeview), "font_selector_family" ); + +#if GTK_CHECK_VERSION(3,0,0) + GtkCssProvider *css_provider = gtk_css_provider_new(); + gtk_css_provider_load_from_data(css_provider, + "#font_selector_family {\n" + " -GtkWidget-wide-separators: true;\n" + " -GtkWidget-separator-height: 6;\n" + "}\n", + -1, NULL); + + GdkScreen *screen = gdk_screen_get_default(); + gtk_style_context_add_provider_for_screen(screen, + GTK_STYLE_PROVIDER(css_provider), + GTK_STYLE_PROVIDER_PRIORITY_USER); +#else gtk_rc_parse_string ( "widget \"*font_selector_family\" style \"fontfamily-separator-style\""); - +#endif Inkscape::FontLister* fontlister = Inkscape::FontLister::get_instance(); Glib::RefPtr<Gtk::ListStore> store = fontlister->get_font_list(); |
