summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-19 08:42:39 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-19 08:42:39 +0200
commitabab828dbbc3332d9625408ff4c0471f39da4b91 (patch)
tree89a9c4e76241189395593116b6f598ccd7596584 /src/ui/window.c
parent37869eb4d7893bf7aa7a683d33e46ac404e97756 (diff)
Window: Reduce navbar padding on portrait phone
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c4
1 files changed, 3 insertions, 1 deletions
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) {
488 setPadding_Widget(toolBar, left, 0, right, bottom); 488 setPadding_Widget(toolBar, left, 0, right, bottom);
489 } 489 }
490 } 490 }
491 /* Note that `handleNavBarCommands_` also adjusts padding and spacing. */
491#endif 492#endif
492} 493}
493 494
@@ -547,7 +548,8 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {
547 const iBool isPhone = deviceType_App() == phone_AppDeviceType; 548 const iBool isPhone = deviceType_App() == phone_AppDeviceType;
548 const iBool isNarrow = !isPhone && isNarrow_Window(get_Window()); 549 const iBool isNarrow = !isPhone && isNarrow_Window(get_Window());
549 /* Adjust navbar padding. */ { 550 /* Adjust navbar padding. */ {
550 int hPad = isPhone || isNarrow ? gap_UI / 2 : gap_UI * 3 / 2; 551 int hPad = isPhone && isPortrait_App() ? 0 : (isPhone || isNarrow) ? gap_UI / 2
552 : gap_UI * 3 / 2;
551 int vPad = gap_UI * 3 / 2; 553 int vPad = gap_UI * 3 / 2;
552 int topPad = !findWidget_App("winbar") ? gap_UI / 2 : 0; 554 int topPad = !findWidget_App("winbar") ? gap_UI / 2 : 0;
553 setPadding_Widget(navBar, hPad, vPad / 3 + topPad, hPad, vPad / 2); 555 setPadding_Widget(navBar, hPad, vPad / 3 + topPad, hPad, vPad / 2);