[Xfce4-commits] [apps/xfce4-notifyd] 01/01: Ensure normal font size with Adwaita and keycap class

noreply at xfce.org noreply at xfce.org
Tue Jan 7 23:48:49 CET 2020


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 apps/xfce4-notifyd.

commit 0676670a2f666e98c77866dbc60a5b2655564e39
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Tue Jan 7 23:47:41 2020 +0100

    Ensure normal font size with Adwaita and keycap class
    
    Since we use keycap as the fallback class for notification windows we
    should also make sure that we get a normal font size and not the small
    font size that keycap sets.
---
 xfce4-notifyd/xfce-notify-window.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xfce4-notifyd/xfce-notify-window.c b/xfce4-notifyd/xfce-notify-window.c
index 6e87532..28e1307 100644
--- a/xfce4-notifyd/xfce-notify-window.c
+++ b/xfce4-notifyd/xfce-notify-window.c
@@ -176,6 +176,7 @@ xfce_notify_window_init(XfceNotifyWindow *window)
     GtkWidget *topvbox, *tophbox, *vbox;
     gint screen_width;
     gdouble padding = DEFAULT_PADDING;
+    GtkCssProvider *provider;
 #if GTK_CHECK_VERSION (3, 22, 0)
     GdkMonitor *monitor;
     GdkRectangle geometry;
@@ -288,6 +289,13 @@ xfce_notify_window_init(XfceNotifyWindow *window)
     gtk_box_set_spacing (GTK_BOX(window->button_box), padding / 2);
     gtk_box_set_homogeneous (GTK_BOX(window->button_box), FALSE);
     gtk_box_pack_end (GTK_BOX(topvbox), window->button_box, FALSE, FALSE, 0);
+
+    gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (window)), "xfce4-notifyd");
+    provider = gtk_css_provider_new ();
+    gtk_css_provider_load_from_data (provider, ".xfce4-notifyd { font-size: initial; }", -1, NULL);
+    gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (window)),
+                                    GTK_STYLE_PROVIDER (provider),
+                                    GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 }
 
 static void

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


More information about the Xfce4-commits mailing list