summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-01-09 23:04:46 -0500
committerlukefromdc <[email protected]>2017-01-09 23:04:46 -0500
commit5bdda73212808452a1355906b4b47615a2cb7024 (patch)
treec05d4b6e81ce90593681044d5ecebd425eec7018
parent72c14cd7309e2b54798e547c240aefe224a11eff (diff)
downloadmate-panel-5bdda73212808452a1355906b4b47615a2cb7024.tar.bz2
mate-panel-5bdda73212808452a1355906b4b47615a2cb7024.tar.xz
GTK 3.20/22: fix warnings from tasklist buttons
Force padding and margins to zero. Borders don't seem to throw warnings here
-rw-r--r--applets/wncklet/window-list.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 2b7e2974..d3b7dbfe 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -384,11 +384,26 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
TasklistData* tasklist;
GtkActionGroup* action_group;
gchar* ui_path;
+ GtkCssProvider *provider;
+ GdkScreen *screen;
tasklist = g_new0(TasklistData, 1);
tasklist->applet = GTK_WIDGET(applet);
+ provider = gtk_css_provider_new ();
+ screen = gdk_screen_get_default ();
+ gtk_css_provider_load_from_data (provider,
+ ".mate-panel-menu-bar button,\n"
+ " #tasklist-button {\n"
+ " padding: 0px;\n"
+ " margin: 0px;\n }",
+ -1, NULL);
+ gtk_style_context_add_provider_for_screen (screen,
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
+
mate_panel_applet_set_flags(MATE_PANEL_APPLET(tasklist->applet), MATE_PANEL_APPLET_EXPAND_MAJOR | MATE_PANEL_APPLET_EXPAND_MINOR | MATE_PANEL_APPLET_HAS_HANDLE);
setup_gsettings(tasklist);