[Xfce4-commits] [xfce/xfce4-panel] 01/01: Fix launchers overlapping with Adwaita

noreply at xfce.org noreply at xfce.org
Thu Mar 2 00:22:21 CET 2017


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository xfce/xfce4-panel.

commit fa4477d6b48f05c855272e7296a047c551e68108
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu Mar 2 00:22:15 2017 +0100

    Fix launchers overlapping with Adwaita
---
 plugins/launcher/launcher.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/plugins/launcher/launcher.c b/plugins/launcher/launcher.c
index 5ff670a..bed2ddf 100644
--- a/plugins/launcher/launcher.c
+++ b/plugins/launcher/launcher.c
@@ -341,6 +341,8 @@ static void
 launcher_plugin_init (LauncherPlugin *plugin)
 {
   GtkIconTheme *icon_theme;
+  GtkStyleContext *context;
+  GtkCssProvider *provider;
 
   plugin->disable_tooltips = FALSE;
   plugin->move_first = FALSE;
@@ -413,6 +415,15 @@ launcher_plugin_init (LauncherPlugin *plugin)
       G_CALLBACK (launcher_plugin_button_state_changed), plugin->arrow);
   g_signal_connect (G_OBJECT (plugin->arrow), "state-changed",
       G_CALLBACK (launcher_plugin_button_state_changed), plugin->button);
+
+  /* Make sure themes like Adwaita, which set excessive padding, don't cause the
+     launcher buttons to overlap when panels have a fairly normal size */
+  context = gtk_widget_get_style_context (GTK_WIDGET (plugin->button));
+  provider = gtk_css_provider_new ();
+  gtk_css_provider_load_from_data (provider, ".xfce4-panel button { padding: 0; }", -1, NULL);
+  gtk_style_context_add_provider (context,
+                                  GTK_STYLE_PROVIDER (provider),
+                                  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list