From 443c62b87b49b90fbeff45e9fded3ddf4c9703b0 Mon Sep 17 00:00:00 2001 From: Pascal Garber Date: Thu, 11 Jun 2026 18:25:14 +0200 Subject: [PATCH] Gnome: anchor run toolbar to the editor column The floating run toolbar was a window-level overlay positioned with a fixed margin-end of 360px to clear the adjacent panel. That breaks as soon as the panel next to it changes: in the medium layout the sidebar is toggled away but the space was still reserved, and in the ultra-wide layout the sidebar is wider than 360px so the toolbar floated above the tutorial text (#131). Anchor the toolbar to an overlay around the editor column itself, so it sticks to the editor edge in every breakpoint and text direction without any magic margins. Fixes #131 --- packages/app-gnome/src/views/main.window.blp | 26 +++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/packages/app-gnome/src/views/main.window.blp b/packages/app-gnome/src/views/main.window.blp index e21c2e42..031189a7 100644 --- a/packages/app-gnome/src/views/main.window.blp +++ b/packages/app-gnome/src/views/main.window.blp @@ -173,10 +173,25 @@ template $MainWindow: Adw.ApplicationWindow { hexpand: true; vexpand: true; - // Center column (Editor) - Box centerColumn { + // Center column (Editor) with the run toolbar anchored to + // its edge, so it tracks the editor across all breakpoints + // and text directions instead of relying on a fixed margin + Overlay centerOverlay { hexpand: true; vexpand: true; + + child: Box centerColumn { + hexpand: true; + vexpand: true; + }; + + [overlay] + $Toolbar runToolbar { + halign: end; + valign: start; + margin-end: 12; + margin-top: 12; + } } Separator {} @@ -229,13 +244,6 @@ template $MainWindow: Adw.ApplicationWindow { margin-bottom: 0; } - [overlay] - $Toolbar runToolbar { - halign: end; - valign: start; - margin-end: 360; - margin-top: 46; - } }; [bottom]