=> 659564e2b2a4060a135bd134e2ed3a92bb590799
[1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex d0d565d7..3ac9f1cb 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -881,7 +881,7 @@[m [mstatic void updateVisible_DocumentView_(iDocumentView *d) {[m /* After scrolling/resizing stops, begin pre-rendering the visbuf contents. */ {[m removeTicker_App(prerender_DocumentWidget_, d->owner);[m remove_Periodic(periodic_App(), d);[m [31m- if (~d->owner->flags & animationPlaceholder_DocumentWidgetFlag) {[m [32m+[m[32m if (~d->owner->widget.flags & destroyPending_WidgetFlag) {[m add_Periodic(periodic_App(), d->owner, "document.render");[m }[m }[m [36m@@ -5640,9 +5640,21 @@[m [mstatic void draw_DocumentWidget_(const iDocumentWidget *d) {[m draw_DocumentView_(&d->view);[m iPaint p;[m init_Paint(&p);[m [31m- if (colorTheme_App() == pureWhite_ColorTheme) {[m [32m+[m[32m if (colorTheme_App() == pureWhite_ColorTheme &&[m [32m+[m[32m !(prefs_App()->bottomNavBar && prefs_App()->bottomTabBar)) {[m [32m+[m[32m /* A subtle separator between UI and content. */[m drawHLine_Paint(&p, topLeft_Rect(bounds), width_Rect(bounds), uiSeparator_ColorId);[m }[m [32m+[m[32m if (isPortraitPhone_App() && prefs_App()->bottomNavBar) {[m [32m+[m[32m /* Fill the top safe area. */[m [32m+[m[32m if (topSafeInset_Mobile() > 0) {[m [32m+[m[32m const iRect docBounds = documentBounds_DocumentView_(&d->view);[m [32m+[m[32m fillRect_Paint(&p, initCorners_Rect(zero_I2(), topRight_Rect(safeRect_Root(w->root))),[m [32m+[m[32m !isEmpty_Banner(d->banner) && docBounds.pos.y + viewPos_DocumentView_(&d->view) -[m [32m+[m[32m documentTopPad_DocumentView_(&d->view) > bounds.pos.y ?[m [32m+[m[32m tmBannerBackground_ColorId : tmBackground_ColorId);[m [32m+[m[32m }[m [32m+[m[32m }[m /* Pull action indicator. */[m if (deviceType_App() != desktop_AppDeviceType) {[m float pullPos = pullActionPos_SmoothScroll(&d->view.scrollY);[m [1mdiff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c[m [1mindex afd9c10e..120b6562 100644[m [1m--- a/src/ui/lookupwidget.c[m [1m+++ b/src/ui/lookupwidget.c[m [36m@@ -687,10 +687,11 @@[m [mstatic iBool processEvent_LookupWidget_(iLookupWidget *d, const SDL_Event *ev) {[m }[m else {[m w->rect.pos = windowToLocal_Widget(w, visibleRect_Root(root).pos);[m [31m- w->rect.size.y = height_Rect(visibleRect_Root(root)) - height_Rect(navBarBounds);[m [32m+[m[32m w->rect.size.y = height_Rect(visibleRect_Root(root)) - height_Rect(navBarBounds) +[m [32m+[m[32m (!isPortraitPhone_App() ? bottomSafeInset_Mobile() : 0);[m }[m # if defined (iPlatformAppleMobile)[m [31m- if (deviceType_App() == phone_AppDeviceType) {[m [32m+[m[32m if (deviceType_App() != desktop_AppDeviceType) {[m float l = 0.0f, r = 0.0f;[m safeAreaInsets_iOS(&l, NULL, &r, NULL);[m w->rect.size.x = size_Root(root).x - l - r;[m [1mdiff --git a/src/ui/mobile.c b/src/ui/mobile.c[m [1mindex 3b47d4a1..5acc0c88 100644[m [1m--- a/src/ui/mobile.c[m [1m+++ b/src/ui/mobile.c[m [36m@@ -1037,6 +1037,15 @@[m [mint leftSafeInset_Mobile(void) {[m #endif[m }[m [m [32m+[m[32mint topSafeInset_Mobile(void) {[m [32m+[m[32m#if defined (iPlatformAppleMobile)[m [32m+[m[32m float top;[m [32m+[m[32m safeAreaInsets_iOS(NULL, &top, NULL, NULL);[m [32m+[m[32m return iRound(top);[m [32m+[m[32m#else[m [32m+[m[32m return 0;[m [32m+[m[32m#endif[m [32m+[m[32m}[m [m int bottomSafeInset_Mobile(void) {[m #if defined (iPlatformAppleMobile)[m [1mdiff --git a/src/ui/mobile.h b/src/ui/mobile.h[m [1mindex 79986771..3a12ff07 100644[m [1m--- a/src/ui/mobile.h[m [1m+++ b/src/ui/mobile.h[m [36m@@ -69,4 +69,5 @@[m [mvoid setupMenuTransition_Mobile (iWidget *menu, iBool isIncoming);[m void setupSheetTransition_Mobile (iWidget *sheet, int flags);[m [m int leftSafeInset_Mobile (void);[m [32m+[m[32mint topSafeInset_Mobile (void);[m int bottomSafeInset_Mobile (void);[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 7f96cc9f..a93b9a6a 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -238,10 +238,10 @@[m [mstatic const char *stopSeqCStr_[] = {[m [m static const int loadAnimIntervalMs_ = 133;[m static int loadAnimIndex_ = 0;[m [31m-[m [31m-static iRoot * activeRoot_ = NULL;[m [32m+[m[32mstatic iRoot * activeRoot_ = NULL;[m [m static void setupMovableElements_Root_ (iRoot *);[m [32m+[m[32mstatic void setBottomBarPosition_ (iWidget *bottomBar, iBool show, iBool animate);[m [m iDefineTypeConstruction(Root)[m iDefineAudienceGetter(Root, visualOffsetsChanged)[m [36m@@ -549,6 +549,13 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m }[m else if (equal_Command(cmd, "root.movable")) {[m setupMovableElements_Root_(root->root);[m [32m+[m[32m arrange_Widget(root);[m [32m+[m[32m iWidget *bottomBar = findChild_Widget(root, "bottombar");[m [32m+[m[32m if (bottomBar) {[m [32m+[m[32m /* Update bottom bar height and position. */[m [32m+[m[32m setBottomBarPosition_(bottomBar, isVisible_Widget(bottomBar), iFalse);[m [32m+[m[32m updateToolbarColors_Root(root->root);[m [32m+[m[32m }[m return iFalse; /* all roots must handle this */[m }[m else if (equal_Command(cmd, "theme.changed")) {[m [36m@@ -801,7 +808,8 @@[m [mstatic void updateNavBarSize_(iWidget *navBar) {[m int vPad = gap_UI * 3 / 2;[m int botPad = vPad / 2;[m int topPad = !findWidget_Root("winbar") ? gap_UI / 2 : 0;[m [31m- if (isLandscape_App() && prefs_App()->bottomNavBar) {[m [32m+[m[32m if (prefs_App()->bottomNavBar &&[m [32m+[m[32m ((isPhone && isLandscape_App()) || deviceType_App() == tablet_AppDeviceType)) {[m botPad += bottomSafeInset_Mobile();[m hPad += leftSafeInset_Mobile();[m }[m [36m@@ -1103,6 +1111,17 @@[m [mstatic iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {[m }[m return iTrue;[m }[m [32m+[m[32m else if (deviceType_App() == tablet_AppDeviceType && equal_Command(cmd, "keyboard.changed")) {[m [32m+[m[32m const int keyboardHeight = arg_Command(cmd);[m [32m+[m[32m if (focus_Widget() == findChild_Widget(navBar, "url")) {[m [32m+[m[32m setVisualOffset_Widget(navBar, -keyboardHeight + bottomSafeInset_Mobile(),[m [32m+[m[32m 400, easeOut_AnimFlag | softer_AnimFlag);[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m setVisualOffset_Widget(navBar, 0, 400, easeOut_AnimFlag | softer_AnimFlag);[m [32m+[m[32m }[m [32m+[m[32m return iFalse;[m [32m+[m[32m }[m return iFalse;[m }[m [m [36m@@ -1207,7 +1226,8 @@[m [mstatic iBool handleToolBarCommands_(iWidget *toolBar, const char *cmd) {[m if (!bottomBar) {[m return iFalse;[m }[m [31m- if (focus_Widget() == findChild_Widget(root_Widget(toolBar), "url") && height > 0) {[m [32m+[m[32m iWidget *navBar = findChild_Widget(root_Widget(toolBar), "navbar");[m [32m+[m[32m if (focus_Widget() == findChild_Widget(navBar, "url") && height > 0) {[m int inputHeight = 5 * gap_UI; /* TODO: Why this amount? Something's funny here. */[m int keyboardPad = height - (isPortrait_App() ? height_Widget(toolBar) : inputHeight);[m bottomBar->padding[3] = keyboardPad;[m [36m@@ -1817,6 +1837,7 @@[m [mstatic void setupMovableElements_Root_(iRoot *d) {[m iWidget *div = findChild_Widget(d->widget, "navdiv");[m iWidget *docTabs = findChild_Widget(d->widget, "doctabs");[m iWidget *tabBar = findChild_Widget(docTabs, "tabs.buttons");[m [32m+[m[32m iChangeFlags(navBar->flags2, permanentVisualOffset_WidgetFlag2, iFalse);[m if (prefs->bottomNavBar) {[m if (deviceType_App() == phone_AppDeviceType) {[m /* When at the bottom, the navbar is at the top of the bottombar, and gets fully hidden[m [36m@@ -1832,6 +1853,9 @@[m [mstatic void setupMovableElements_Root_(iRoot *d) {[m removeChild_Widget(navBar->parent, navBar);[m addChildPos_Widget(div, navBar, back_WidgetAddPos);[m iRelease(navBar);[m [32m+[m[32m /* We'll need to be able to move the input field from under the keyboard. */[m [32m+[m[32m iChangeFlags(navBar->flags2, permanentVisualOffset_WidgetFlag2,[m [32m+[m[32m deviceType_App() == tablet_AppDeviceType);[m }[m }[m else {[m [36m@@ -1847,9 +1871,17 @@[m [mstatic void setupMovableElements_Root_(iRoot *d) {[m iRelease(navBar);[m }[m iChangeFlags(tabBar->flags2, permanentVisualOffset_WidgetFlag2, prefs->bottomTabBar);[m [32m+[m[32m /* Adjust safe area paddings. */[m [32m+[m[32m if (deviceType_App() == tablet_AppDeviceType && prefs->bottomTabBar && !prefs->bottomNavBar) {[m [32m+[m[32m tabBar->padding[3] = bottomSafeInset_Mobile();[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m tabBar->padding[3] = 0;[m [32m+[m[32m }[m setTabBarPosition_Widget(docTabs, prefs->bottomTabBar);[m arrange_Widget(d->widget);[m postRefresh_App();[m [32m+[m[32m postCommand_App("window.resized"); /* not really, but some widgets will update their layout */[m }[m [m static void setBottomBarPosition_(iWidget *bottomBar, iBool show, iBool animate) {[m [36m@@ -1863,7 +1895,7 @@[m [mstatic void setBottomBarPosition_(iWidget *bottomBar, iBool show, iBool animate)[m iWidget *docTabs = findChild_Widget(root->widget, "doctabs");[m iWidget *toolBar = findChild_Widget(bottomBar, "toolbar");[m iWidget *navBar = findChild_Widget(root->widget, "navbar");[m [31m- const int height = size_Root(root).y - top_Rect(boundsWithoutVisualOffset_Widget(bottomBar));[m [32m+[m[32m const int height = height_Widget(bottomBar);[m size_t numPages = 0;[m iBool bottomTabBar = prefs->bottomTabBar;[m if (prefs->bottomTabBar || prefs->bottomNavBar) {[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex 17a4e87b..3536d2fc 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -908,10 +908,9 @@[m [mvoid init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {[m setId_Widget([m addChildPosFlags_Widget(listAndActions,[m iClob(d->actions = new_Widget()),[m [31m- /*isPhone ? front_WidgetAddPos :*/ back_WidgetAddPos,[m [32m+[m[32m back_WidgetAddPos,[m arrangeHorizontal_WidgetFlag | arrangeHeight_WidgetFlag |[m [31m- resizeWidthOfChildren_WidgetFlag), // |[m [31m- // drawBackgroundToHorizontalSafeArea_WidgetFlag),[m [32m+[m[32m resizeWidthOfChildren_WidgetFlag),[m "actions");[m if (deviceType_App() != desktop_AppDeviceType) {[m setFlags_Widget(findChild_Widget(w, "sidebar.title"), borderTop_WidgetFlag, iTrue);[m [36m@@ -1366,11 +1365,14 @@[m [mstatic iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)[m isPortrait_App());[m setBackgroundColor_Widget(w, isPortrait_App() ? uiBackgroundSidebar_ColorId : none_ColorId);[m }[m [31m- if (!isPortraitPhone_App()) {[m [32m+[m[32m if (!isPortraitPhone_App() && !prefs_App()->bottomTabBar && !prefs_App()->bottomNavBar) {[m /* In sliding sheet mode, sidebar is resized to fit in the safe area. */[m setPadding_Widget(d->actions, 0, 0, 0, bottomSafeInset_Mobile());[m }[m [31m- return iFalse;[m [32m+[m[32m else {[m [32m+[m[32m setPadding_Widget(d->actions, 0, 0, 0, 0);[m [32m+[m[32m }[m [32m+[m[32m return iFalse;[m }[m else if (isMetricsChange_UserEvent(ev)) {[m w->rect.size.x = d->widthAsGaps * gap_UI;[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex a6567016..6827ea08 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -2527,10 +2527,9 @@[m [miWidget *makePreferences_Widget(void) {[m const iMenuItem uiPanelItems[] = {[m { "title id:heading.prefs.interface" },[m { "dropdown device:0 id:prefs.returnkey", 0, 0, (const void *) returnKeyBehaviors },[m [31m- { "padding device:1" },[m [32m+[m[32m { "toggle device:2 id:prefs.hidetoolbarscroll" },[m { "toggle id:prefs.bottomnavbar" },[m { "toggle id:prefs.bottomtabbar" },[m [31m- { "toggle device:2 id:prefs.hidetoolbarscroll" },[m { "heading device:2 id:heading.prefs.toolbaractions" },[m { "dropdown device:2 id:prefs.toolbaraction1", 0, 0, (const void *) toolbarActionItems[0] },[m { "dropdown device:2 id:prefs.toolbaraction2", 0, 0, (const void *) toolbarActionItems[1] },[m [36m@@ -2577,17 +2576,18 @@[m [miWidget *makePreferences_Widget(void) {[m { "title id:heading.prefs.style" },[m { "radio horizontal:1 id:prefs.linewidth", 0, 0, (const void *) lineWidthItems },[m { "padding" },[m [32m+[m[32m { "toggle id:prefs.justify" },[m [32m+[m[32m { "toggle id:prefs.plaintext.wrap" },[m [32m+[m[32m { "toggle id:prefs.biglede" },[m [32m+[m[32m { "padding" },[m { "input id:prefs.linespacing maxlen:5" },[m { "input id:prefs.tabwidth maxlen:3" },[m { "radio id:prefs.quoteicon", 0, 0, (const void *) quoteItems },[m { "buttons id:prefs.boldlink", 0, 0, (const void *) boldLinkItems },[m { "padding" },[m [31m- { "toggle id:prefs.justify" },[m [31m- { "toggle id:prefs.biglede" },[m [31m- { "toggle id:prefs.plaintext.wrap" },[m [31m- { "toggle id:prefs.collapsepreonload" },[m { "toggle id:prefs.sideicon" },[m [31m- { "toggle id:prefs.centershort" }, [m [32m+[m[32m { "toggle id:prefs.centershort" },[m [32m+[m[32m { "toggle id:prefs.collapsepreonload" },[m { NULL } [m };[m const iMenuItem networkPanelItems[] = {[m [1mdiff --git a/src/ui/widget.c b/src/ui/widget.c[m [1mindex 82ff4c57..61c8a37e 100644[m [1m--- a/src/ui/widget.c[m [1m+++ b/src/ui/widget.c[m [36m@@ -1509,10 +1509,10 @@[m [mvoid drawLayerEffects_Widget(const iWidget *d) {[m }[m }[m if (d->flags & drawBackgroundToVerticalSafeArea_WidgetFlag) {[m [31m- if (top_Rect(rect) > center.y) {[m [32m+[m[32m if (top_Rect(rect) > center.y * 3 / 2) {[m bottom = rootSize.y - bottom_Rect(rect);[m }[m [31m- if (bottom_Rect(rect) < center.y) {[m [32m+[m[32m if (bottom_Rect(rect) < center.y / 2) {[m top = -top_Rect(rect);[m }[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).