From 72d98053f9359f39dc5cd9ec0c55f26d50b7b52c Mon Sep 17 00:00:00 2001 From: Anthony Lupow Date: Thu, 21 May 2026 17:59:40 +0200 Subject: [PATCH] feat: make ui margins consistent --- src/ui_helpers.go | 4 ++-- src/window_launcher.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ui_helpers.go b/src/ui_helpers.go index 71d4d76..67280b4 100644 --- a/src/ui_helpers.go +++ b/src/ui_helpers.go @@ -36,8 +36,8 @@ var launcherMetrics = launcherMetricsType{ IconSize: 128, IconPadding: 6, ButtonSpacing: 16, - ContentMarginH: 12, - ContentMarginT: 24, + ContentMarginH: 16, + ContentMarginT: 16, ContentMarginB: 8, BarMargin: 8, MaxColumns: 6, diff --git a/src/window_launcher.go b/src/window_launcher.go index 8d1d7c4..aa55e62 100644 --- a/src/window_launcher.go +++ b/src/window_launcher.go @@ -47,6 +47,9 @@ func showLauncherWindow(app *adw.Application, url string, browsers []*Browser, c flowBox.Insert(btn, -1) } + // Correct max column items. This helps getting rid of empty item spacing. + flowBox.SetMaxChildrenPerLine(min(flowBox.MaxChildrenPerLine(), uint(len(filteredBrowsers)))) + // Handle Enter/Space activation on selected FlowBox child flowBox.ConnectChildActivated(func(child *gtk.FlowBoxChild) { idx := child.Index() -- 2.51.2