summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2018-12-10 23:43:46 -0500
committerraveit65 <[email protected]>2018-12-12 16:00:40 +0100
commit3e73d66a4e9f41958ca5148bd76d49ab28904793 (patch)
tree6bb94436b3e7f100c1058e56da985f537965a8ab /applets
parenta0d306870068a9cd2d637018275679671d0ec190 (diff)
downloadmate-panel-3e73d66a4e9f41958ca5148bd76d49ab28904793.tar.bz2
mate-panel-3e73d66a4e9f41958ca5148bd76d49ab28904793.tar.xz
clock.c: Force negative margin, not passing on clockbutton
Allow themers to set padding on the clock without cutting the weather icons
Diffstat (limited to 'applets')
-rw-r--r--applets/clock/clock.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index bfbc96bc..309d5e0f 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1273,15 +1273,16 @@ clock_update_text_gravity (GtkWidget *label)
}
static inline void
-force_no_button_padding (GtkWidget *widget)
+force_button_negative_margin (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 }",
+ "#clock-applet-button.flat.toggle > box.horizontal > box.horizontal > image {\n"
+ "margin-top: -4px;\n"
+ "margin-bottom: -4px;\n"
+ "}",
-1, NULL);
gtk_style_context_add_provider (gtk_widget_get_style_context (widget),
GTK_STYLE_PROVIDER (provider),
@@ -1300,7 +1301,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_button_negative_margin (button);
return button;
}