@@ -61,15 +61,22 @@ WfSingleNotification::WfSingleNotification(const Notification & notification)
61
61
app_icon.set_from_icon_name (" dialog-information" , Gtk::ICON_SIZE_LARGE_TOOLBAR);
62
62
}
63
63
64
+ get_style_context ()->add_class (" notification" );
65
+
66
+ app_icon.get_style_context ()->add_class (" app-icon" );
67
+
68
+ top_bar.get_style_context ()->add_class (" top-bar" );
64
69
top_bar.pack_start (app_icon, false , true );
65
70
66
71
app_name.set_label (notification.app_name );
67
72
app_name.set_halign (Gtk::ALIGN_START);
68
73
app_name.set_ellipsize (Pango::ELLIPSIZE_END);
74
+ app_name.get_style_context ()->add_class (" app-name" );
69
75
top_bar.pack_start (app_name);
70
76
71
77
time_label.set_sensitive (false );
72
78
time_label.set_label (format_recv_time (notification.additional_info .recv_time ));
79
+ time_label.get_style_context ()->add_class (" time" );
73
80
time_label_update = Glib::signal_timeout ().connect (
74
81
[=]
75
82
{
@@ -83,10 +90,10 @@ WfSingleNotification::WfSingleNotification(const Notification & notification)
83
90
close_image.set_from_icon_name (" window-close" , Gtk::ICON_SIZE_LARGE_TOOLBAR);
84
91
close_button.add (close_image);
85
92
close_button.get_style_context ()->add_class (" flat" );
93
+ close_button.get_style_context ()->add_class (" close" );
86
94
close_button.signal_clicked ().connect (
87
95
[=] { Daemon::Instance ()->closeNotification (notification.id , Daemon::CloseReason::Dismissed); });
88
96
top_bar.pack_start (close_button, false , true );
89
- top_bar.set_spacing (5 );
90
97
91
98
child.add (top_bar);
92
99
@@ -104,6 +111,7 @@ WfSingleNotification::WfSingleNotification(const Notification & notification)
104
111
}
105
112
}
106
113
114
+ content.get_style_context ()->add_class (" notification-contents" );
107
115
content.pack_end (image);
108
116
109
117
text.set_halign (Gtk::ALIGN_START);
@@ -122,6 +130,8 @@ WfSingleNotification::WfSingleNotification(const Notification & notification)
122
130
123
131
child.add (content);
124
132
133
+ actions.get_style_context ()->add_class (" actions" );
134
+
125
135
if (!notification.actions .empty ())
126
136
{
127
137
for (uint i = 0 ; i + 1 < notification.actions .size (); ++++ i)
@@ -150,7 +160,6 @@ WfSingleNotification::WfSingleNotification(const Notification & notification)
150
160
151
161
if (!actions.get_children ().empty ())
152
162
{
153
- actions.set_spacing (5 );
154
163
actions.set_homogeneous ();
155
164
child.add (actions);
156
165
}
0 commit comments