[Xfce4-commits] [xfce/xfce4-panel] 01/01: tasklist: Define cosmetic default padding for images (Bug #13865)

noreply at xfce.org noreply at xfce.org
Sun Oct 15 23:09:31 CEST 2017


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

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-panel.

commit 589515347c797c10374ae1f39d694746707d91b0
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sun Oct 15 23:08:30 2017 +0200

    tasklist: Define cosmetic default padding for images (Bug #13865)
    
    This fixes themes like Adwaita looking fairly bad with no image padding
    in the tasklist items.
---
 plugins/tasklist/tasklist-widget.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c
index faac732..91ad92f 100644
--- a/plugins/tasklist/tasklist-widget.c
+++ b/plugins/tasklist/tasklist-widget.c
@@ -2172,7 +2172,13 @@ xfce_tasklist_child_new (XfceTasklist *tasklist)
   gtk_container_add (GTK_CONTAINER (child->button), child->box);
   gtk_widget_show (child->box);
 
+  provider = gtk_css_provider_new ();
+  gtk_css_provider_load_from_data (provider, "image { padding: 3px; }", -1, NULL);
   child->icon = gtk_image_new ();
+  gtk_style_context_add_provider (gtk_widget_get_style_context (child->icon),
+                                  GTK_STYLE_PROVIDER (provider),
+                                  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+  g_object_unref (provider);
   if (tasklist->show_labels)
     gtk_box_pack_start (GTK_BOX (child->box), child->icon, FALSE, TRUE, 0);
   else
@@ -2195,6 +2201,7 @@ xfce_tasklist_child_new (XfceTasklist *tasklist)
       gtk_label_set_angle (GTK_LABEL (child->label), 270);
       /* TODO can we already ellipsize here yet? */
     }
+
   provider = gtk_css_provider_new ();
   gtk_css_provider_load_from_data (provider, ".label-hidden { opacity: 0.75; }", -1, NULL);
   gtk_style_context_add_provider (gtk_widget_get_style_context (child->label),

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


More information about the Xfce4-commits mailing list