Skip to content

Commit 30728ab

Browse files
authored
Panel: add style provider for display, style correct selector (#620)
1 parent 51b38f8 commit 30728ab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Widgets/Panel.vala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,15 @@ public class Wingpanel.Widgets.Panel : Gtk.EventBox {
274274
private void update_background (Services.BackgroundState state, uint animation_duration) {
275275
if (style_provider == null) {
276276
style_provider = new Gtk.CssProvider ();
277-
style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
277+
Gtk.StyleContext.add_provider_for_screen (
278+
Gdk.Screen.get_default (),
279+
style_provider,
280+
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION
281+
);
278282
}
279283

280284
string css = """
281-
.panel {
285+
panel {
282286
transition: all %ums cubic-bezier(0.4, 0, 0.2, 1);
283287
}
284288
""".printf (animation_duration);

0 commit comments

Comments
 (0)