From 42ae04c02fe13f8d323b7ae9222f7d5a0e465610 Mon Sep 17 00:00:00 2001 From: Leonhard Kargl Date: Wed, 25 Mar 2026 16:28:10 +0100 Subject: [PATCH] Fix Indicators not opening in translucent style --- data/styles/Application.css | 1 - src/PanelWindow.vala | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 ();