From abab828dbbc3332d9625408ff4c0471f39da4b91 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Fri, 19 Mar 2021 08:42:39 +0200 Subject: Window: Reduce navbar padding on portrait phone --- src/ui/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/window.c b/src/ui/window.c index 0f289ff4..4e89df37 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -488,6 +488,7 @@ static void updatePadding_Window_(iWindow *d) { setPadding_Widget(toolBar, left, 0, right, bottom); } } + /* Note that `handleNavBarCommands_` also adjusts padding and spacing. */ #endif } @@ -547,7 +548,8 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { const iBool isPhone = deviceType_App() == phone_AppDeviceType; const iBool isNarrow = !isPhone && isNarrow_Window(get_Window()); /* Adjust navbar padding. */ { - int hPad = isPhone || isNarrow ? gap_UI / 2 : gap_UI * 3 / 2; + int hPad = isPhone && isPortrait_App() ? 0 : (isPhone || isNarrow) ? gap_UI / 2 + : gap_UI * 3 / 2; int vPad = gap_UI * 3 / 2; int topPad = !findWidget_App("winbar") ? gap_UI / 2 : 0; setPadding_Widget(navBar, hPad, vPad / 3 + topPad, hPad, vPad / 2); -- cgit v1.2.3