diff --git a/data/styles/Application.css b/data/styles/Application.css index 3e90f292..572d235f 100644 --- a/data/styles/Application.css +++ b/data/styles/Application.css @@ -16,7 +16,6 @@ panel.maximized { panel.translucent > box { border-radius: 5px 5px 0 0; - margin-bottom: 4px; } panel.translucent.color-dark > box { diff --git a/src/PanelWindow.vala b/src/PanelWindow.vala index a85b45e6..eab20a65 100644 --- a/src/PanelWindow.vala +++ b/src/PanelWindow.vala @@ -72,12 +72,20 @@ public class Wingpanel.PanelWindow : Gtk.Window { } private void on_realize () { + ((Gdk.Toplevel) get_surface ()).compute_size.connect (on_compute_size); + update_panel_dimensions (); Services.BackgroundManager.initialize (panel_height); init_wl (); } + private void on_compute_size (Gdk.ToplevelSize top_level_size) { + /* We do our own size calculation to make sure the box shadow in the translucent style isn't cut off */ + top_level_size.set_size (width_request, panel.get_height () + 5); + top_level_size.set_shadow_width (0, 0, 0, 5); + } + private void update_panel_dimensions () { panel_height = panel.get_height ();