Skip to content

Commit 4c23197

Browse files
author
raveit65
committed
clock: force no button vertical padding and margin
fixes weather-icon problems with some themes
1 parent 422f7e5 commit 4c23197

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

applets/clock/clock.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,15 +1273,17 @@ clock_update_text_gravity (GtkWidget *label)
12731273
}
12741274

12751275
static inline void
1276-
force_button_negative_margin (GtkWidget *widget)
1276+
force_no_button_vertical_padding (GtkWidget *widget)
12771277
{
12781278
GtkCssProvider *provider;
12791279

12801280
provider = gtk_css_provider_new ();
12811281
gtk_css_provider_load_from_data (provider,
1282-
"#clock-applet-button.flat.toggle > box.horizontal > box.horizontal > image {\n"
1283-
"margin-top: -4px;\n"
1284-
"margin-bottom: -4px;\n"
1282+
"#clock-applet-button {\n"
1283+
"padding-top: 0px;\n"
1284+
"padding-bottom: 0px;\n"
1285+
"margin-top: 0px;\n"
1286+
"margin-bottom: 0px;\n"
12851287
"}",
12861288
-1, NULL);
12871289
gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
@@ -1301,7 +1303,7 @@ create_main_clock_button (void)
13011303
button = gtk_toggle_button_new ();
13021304
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
13031305

1304-
force_button_negative_margin (button);
1306+
force_no_button_vertical_padding (button);
13051307

13061308
return button;
13071309
}

0 commit comments

Comments
 (0)