summaryrefslogtreecommitdiff
path: root/applets/clock
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-12-24 18:20:55 +0100
committerraveit65 <[email protected]>2018-12-29 10:41:27 +0100
commit4c2319756605f0b30e76832f7dd369cc7c6763eb (patch)
tree0cbc840d03501bc527456b0f617af91b6e3b7a45 /applets/clock
parent422f7e5128d77c88d5dba2d9eecdc09827a413a3 (diff)
downloadmate-panel-4c2319756605f0b30e76832f7dd369cc7c6763eb.tar.bz2
mate-panel-4c2319756605f0b30e76832f7dd369cc7c6763eb.tar.xz
clock: force no button vertical padding and margin
fixes weather-icon problems with some themes
Diffstat (limited to 'applets/clock')
-rw-r--r--applets/clock/clock.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 309d5e0f..5fee4a85 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1273,15 +1273,17 @@ clock_update_text_gravity (GtkWidget *label)
}
static inline void
-force_button_negative_margin (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.flat.toggle > box.horizontal > box.horizontal > image {\n"
- "margin-top: -4px;\n"
- "margin-bottom: -4px;\n"
+ "#clock-applet-button {\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),
@@ -1301,7 +1303,7 @@ create_main_clock_button (void)
button = gtk_toggle_button_new ();
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- force_button_negative_margin (button);
+ force_no_button_vertical_padding (button);
return button;
}