summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-12-10 23:43:46 -0500
committerraveit65 <[email protected]>2019-01-06 17:26:16 +0100
commitb79d153353a44525f85d1c2a73bf5c5d7484a6d5 (patch)
tree84725354fa1fd16eec2611289f61f2c025d1ce98
parent4a5a2dc3cfa3e196a90a7504895485dbba8495e9 (diff)
downloadmate-panel-b79d153353a44525f85d1c2a73bf5c5d7484a6d5.tar.bz2
mate-panel-b79d153353a44525f85d1c2a73bf5c5d7484a6d5.tar.xz
clock: force no button vertical padding and margin
fixes weather-icon problems with some themes
-rw-r--r--applets/clock/clock.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index bfbc96bc..5fee4a85 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1273,15 +1273,18 @@ clock_update_text_gravity (GtkWidget *label)
}
static inline void
-force_no_button_padding (GtkWidget *widget)
+force_no_button_vertical_padding (GtkWidget *widget)
{
GtkCssProvider *provider;
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider,
"#clock-applet-button {\n"
- " padding: 0px;\n"
- " margin: 0px;\n }",
+ "padding-top: 0px;\n"
+ "padding-bottom: 0px;\n"
+ "margin-top: 0px;\n"
+ "margin-bottom: 0px;\n"
+ "}",
-1, NULL);
gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
GTK_STYLE_PROVIDER (provider),
@@ -1300,7 +1303,7 @@ create_main_clock_button (void)
button = gtk_toggle_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- force_no_button_padding (button);
+ force_no_button_vertical_padding (button);
return button;
}