Skip to content

Commit 2e0a74d

Browse files
committed
Theme: show applet handles on non-MATE themes
Fix #758 Ensure that themes such as GNOME themes (e.g Adwaita) that do not explicitly support MATE show the drag handles for applets such as tray and window-list.
1 parent d3d057d commit 2e0a74d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

mate-panel/libmate-panel-applet-private/panel-applet-frame-dbus.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,36 @@ mate_panel_applet_frame_dbus_change_background (MatePanelAppletFrame *frame,
262262

263263
g_free (bg_str);
264264
}
265+
GtkCssProvider *provider;
266+
provider = gtk_css_provider_new ();
267+
gtk_css_provider_load_from_data (provider,
268+
"MatePanelAppletFrameDBus > MatePanelAppletFrameDBus { \n"
269+
"border-style: solid; \n"
270+
"border-width: 3px; \n"
271+
"border-color: transparent; \n"
272+
"background-repeat: no-repeat; \n"
273+
"background-position: left; \n"
274+
"background-image: linear-gradient(to bottom, \n"
275+
"transparent, \n"
276+
"transparent 20%, \n"
277+
"alpha (#999999, 0.6) 21%, \n"
278+
"alpha (#999999, 0.6) 29%, \n"
279+
"transparent 30%, \n"
280+
"transparent 45%, \n"
281+
"alpha (#999999, 0.6) 46%, \n"
282+
"alpha (#999999, 0.6) 54%, \n"
283+
"transparent 55%, \n"
284+
"transparent 70%, \n"
285+
"alpha (#999999, 0.6) 71%, \n"
286+
"alpha (#999999, 0.6) 79%, \n"
287+
"transparent 80%, \n"
288+
"transparent); \n"
289+
"}",
290+
-1, NULL);
291+
gtk_style_context_add_provider (gtk_widget_get_style_context(GTK_WIDGET(frame)),
292+
GTK_STYLE_PROVIDER (provider),
293+
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
294+
g_object_unref (provider);
265295
}
266296

267297
static void

0 commit comments

Comments
 (0)