summaryrefslogtreecommitdiff
path: root/mate-panel/main.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-04-18 23:50:46 -0400
committerraveit65 <[email protected]>2018-04-23 12:00:18 +0200
commit45b25410cddde852554b3153e81ad59a5e6722ad (patch)
treeb2872d60fd5b9447ddfe8168f39c3eab6111a8da /mate-panel/main.c
parentb060d2a6a81ea29efaf59ceafccc462ad7e7d9e2 (diff)
downloadmate-panel-45b25410cddde852554b3153e81ad59a5e6722ad.tar.bz2
mate-panel-45b25410cddde852554b3153e81ad59a5e6722ad.tar.xz
Theme: consistant theming for applet drag handles in all themes
* applet drag-handle: use a symbolic image for the default drag handle image * Use an .svg image with --gtk-recolor (like a symbolic icon), load it from the same directory as the css file so the css parser can find it, and use the theme fg color on it for good contrast * load a css file to use the recolorable image globally for the panel, not for each applet to ensure only one cssprovider is loaded
Diffstat (limited to 'mate-panel/main.c')
-rw-r--r--mate-panel/main.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/mate-panel/main.c b/mate-panel/main.c
index 4289c158..dc136cda 100644
--- a/mate-panel/main.c
+++ b/mate-panel/main.c
@@ -60,7 +60,8 @@ main (int argc, char **argv)
{
char *desktopfile;
GOptionContext *context;
- GError *error;
+ GError *error, *error2;
+ GtkCssProvider *provider;
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -166,6 +167,23 @@ main (int argc, char **argv)
* connecting to the session manager */
panel_session_init ();
+ /*Load a css file from a path so the drag handle image can be loaded*/
+ error2 = NULL;
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_path (provider,
+ DATADIR "/mate-panel/" "mate-panel.css", &error2);
+
+ if (error2 != NULL) {
+ g_warning ("Can't parse mate-panel CSS custom description: %s\n", error2->message);
+ g_error_free (error2);
+ }
+ else {
+ gtk_style_context_add_provider_for_screen (gdk_screen_get_default(),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
+ }
+ g_object_unref (provider);
+
gtk_main ();
panel_lockdown_finalize ();