Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
- index bdcd831..ddfbba7 100644
- --- a/panel-plugin/battery.c
- +++ b/panel-plugin/battery.c
- @@ -600,6 +600,7 @@ battmon.c:241: for each function it appears in.)
- }
- #if GTK_CHECK_VERSION (3, 16, 0)
- + static GtkCssProvider *current_css_provider = NULL;
- #if GTK_CHECK_VERSION (3, 20, 0)
- gchar * cssminsizes = "min-width: 4px; min-height: 0px";
- if (gtk_orientable_get_orientation(GTK_ORIENTABLE(battmon->battstatus)) == GTK_ORIENTATION_HORIZONTAL)
- @@ -619,6 +620,13 @@ battmon.c:241: for each function it appears in.)
- GTK_STYLE_PROVIDER (css_provider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
- g_free(css);
- + if (current_css_provider) {
- + gtk_style_context_remove_provider (
- + GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (battmon->battstatus))),
- + GTK_STYLE_PROVIDER (current_css_provider));
- + g_object_unref (current_css_provider);
- + }
- + current_css_provider = css_provider;
- #else
- gtk_widget_override_background_color (GTK_WIDGET (battmon->battstatus), GTK_STATE_FLAG_NORMAL, color);
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement