=> 1cd4c78086ab921f13393942ab06fadda196c6c9
[1mdiff --git a/src/app.h b/src/app.h[m [1mindex 003b8d37..f2f1fb0d 100644[m [1m--- a/src/app.h[m [1m+++ b/src/app.h[m [36m@@ -88,6 +88,7 @@[m [miBool isLandscape_App (void);[m iLocalDef iBool isPortrait_App (void) { return !isLandscape_App(); }[m enum iAppDeviceType deviceType_App (void);[m iLocalDef iBool isPortraitPhone_App (void) { return isPortrait_App() && deviceType_App() == phone_AppDeviceType; }[m [32m+[m[32miLocalDef iBool isLandscapePhone_App(void) { return isLandscape_App() && deviceType_App() == phone_AppDeviceType; }[m iBool isRunningUnderWindowSystem_App (void);[m [m iGmCerts * certs_App (void);[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex ca73f3a5..da90a796 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -523,7 +523,6 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos); [m setWidth_SidebarWidget(sidebar, 73.0f);[m setFlags_Widget(as_Widget(sidebar), fixedHeight_WidgetFlag | fixedPosition_WidgetFlag, iFalse);[m [31m- showToolbar_Root(root->root, iFalse);[m }[m else {[m addChild_Widget(root, iClob(sidebar));[m [36m@@ -535,8 +534,8 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m setMidHeight_SidebarWidget(sidebar, midHeight);[m setFixedSize_Widget(as_Widget(sidebar), init_I2(-1, midHeight));[m setPos_Widget(as_Widget(sidebar), init_I2(0, height_Widget(root) - midHeight));[m [31m- showToolbar_Root(root->root, iTrue);[m }[m [32m+[m[32m showToolbar_Root(root->root, isPortrait_App() || prefs_App()->bottomNavBar);[m return iFalse;[m }[m else if (equal_Command(cmd, "root.arrange")) {[m [36m@@ -849,8 +848,8 @@[m [mstatic void updateNavBarSize_(iWidget *navBar) {[m static const char *buttons[] = { "navbar.action1", "navbar.action2", "navbar.action3",[m "navbar.action4", "navbar.ident", "navbar.menu" };[m iWidget *toolBar = findWidget_Root("toolbar");[m [31m- setVisualOffset_Widget(toolBar, 0, 0, 0);[m [31m- setFlags_Widget(toolBar, hidden_WidgetFlag, isLandscape_App());[m [32m+[m[32m// setVisualOffset_Widget(toolBar, 0, 0, 0);[m [32m+[m[32m// setFlags_Widget(toolBar, hidden_WidgetFlag, isLandscape_App());[m iForIndices(i, buttons) {[m iLabelWidget *btn = findChild_Widget(navBar, buttons[i]);[m setFlags_Widget(as_Widget(btn), hidden_WidgetFlag, isPortrait_App());[m [36m@@ -1685,6 +1684,7 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m moveToParentBottomEdge_WidgetFlag |[m parentCannotResizeHeight_WidgetFlag | arrangeVertical_WidgetFlag |[m arrangeHeight_WidgetFlag | resizeWidthOfChildren_WidgetFlag |[m [32m+[m[32m drawBackgroundToHorizontalSafeArea_WidgetFlag |[m drawBackgroundToBottom_WidgetFlag);[m iWidget *toolBar = new_Widget();[m addChild_Widget(bottomBar, iClob(toolBar));[m [36m@@ -1908,7 +1908,6 @@[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 = height_Widget(bottomBar);[m size_t numPages = 0;[m iBool bottomTabBar = prefs->bottomTabBar;[m if (prefs->bottomTabBar || prefs->bottomNavBar) {[m [36m@@ -1927,6 +1926,7 @@[m [mstatic void setBottomBarPosition_(iWidget *bottomBar, iBool show, iBool animate)[m }[m #endif[m showCollapsed_Widget(toolBar, isPortrait_App());[m [32m+[m[32m const int height = height_Widget(bottomBar);[m if (show) {[m if (flags_Widget(bottomBar) & hidden_WidgetFlag) {[m setFlags_Widget(bottomBar, hidden_WidgetFlag, iFalse);[m [36m@@ -1938,7 +1938,12 @@[m [mstatic void setBottomBarPosition_(iWidget *bottomBar, iBool show, iBool animate)[m }[m if (bottomTabBar) {[m /* Tab bar needs to stay visible, too. */[m [31m- setVisualOffset_Widget(tabBar, -bottomBar->rect.size.y, 200 * animate, easeOut_AnimFlag);[m [32m+[m[32m if (prefs->bottomNavBar || isPortrait_App()) {[m [32m+[m[32m setVisualOffset_Widget(tabBar, -height, 200 * animate, easeOut_AnimFlag);[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m setVisualOffset_Widget(tabBar, -bottomSafe, 200 * animate, easeOut_AnimFlag);[m [32m+[m[32m }[m //tabBar->flags2 |= permanentVisualOffset_WidgetFlag2;[m }[m }[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex 3536d2fc..2a2ce30a 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -1365,12 +1365,18 @@[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() && !prefs_App()->bottomTabBar && !prefs_App()->bottomNavBar) {[m [32m+[m[32m if (isPortrait_App()) {[m /* In sliding sheet mode, sidebar is resized to fit in the safe area. */[m [32m+[m[32m setPadding_Widget(d->actions, 0, 0, 0, 0);[m [32m+[m[32m }[m [32m+[m[32m else if (isLandscape_App() && !prefs_App()->bottomTabBar && !prefs_App()->bottomNavBar) {[m setPadding_Widget(d->actions, 0, 0, 0, bottomSafeInset_Mobile());[m }[m else {[m [31m- setPadding_Widget(d->actions, 0, 0, 0, 0);[m [32m+[m[32m setPadding_Widget(d->actions, 0, 0, 0,[m [32m+[m[32m (prefs_App()->bottomNavBar && !prefs_App()->hideToolbarOnScroll ?[m [32m+[m[32m height_Widget(findChild_Widget(root_Widget(w), "navbar")) : 0) +[m [32m+[m[32m bottomSafeInset_Mobile());[m }[m return iFalse;[m }[m [1mdiff --git a/src/ui/widget.c b/src/ui/widget.c[m [1mindex 61c8a37e..632e3900 100644[m [1m--- a/src/ui/widget.c[m [1m+++ b/src/ui/widget.c[m [36m@@ -1518,18 +1518,16 @@[m [mvoid drawLayerEffects_Widget(const iWidget *d) {[m }[m if (top < 0) {[m fillRect_Paint(&p, (iRect){ init_I2(left_Rect(rect), 0),[m [31m- init_I2(width_Rect(rect), top_Rect(rect)) },[m [31m- d->bgColor);[m [32m+[m[32m init_I2(width_Rect(rect), top_Rect(rect)) }, d->bgColor);[m }[m if (left < 0) {[m fillRect_Paint(&p, (iRect){ init_I2(0, top_Rect(rect)),[m [31m- init_I2(left_Rect(rect), height_Rect(rect)) }, d->bgColor);[m [32m+[m[32m init_I2(left_Rect(rect), rootSize.y) }, d->bgColor);[m }[m if (right > 0) {[m fillRect_Paint(&p, (iRect){ init_I2(right_Rect(rect), top_Rect(rect)),[m [31m- init_I2(right, height_Rect(rect)) }, d->bgColor);[m [32m+[m[32m init_I2(right, rootSize.y) }, d->bgColor);[m }[m [31m-// adjustEdges_Rect(&rect, iMin(0, top), iMax(0, right), iMax(0, bottom), iMin(0, left));[m }[m #endif[m }[m [36m@@ -1545,38 +1543,11 @@[m [mvoid drawBackground_Widget(const iWidget *d) {[m if (d->bgColor >= 0 || d->frameColor >= 0) {[m iRect rect = bounds_Widget(d);[m if (d->flags & drawBackgroundToBottom_WidgetFlag) {[m [31m- rect.size.y += size_Root(d->root).y; // = iMax(rect.size.y, size_Root(d->root).y - top_Rect(rect));[m [32m+[m[32m rect.size.y += size_Root(d->root).y;[m }[m iPaint p;[m init_Paint(&p);[m if (d->bgColor >= 0) {[m [31m-#if 0 && defined (iPlatformAppleMobile)[m [31m- /* TODO: This is part of the unbuffered draw (layer effects). */[m [31m- if (d->flags & (drawBackgroundToHorizontalSafeArea_WidgetFlag |[m [31m- drawBackgroundToVerticalSafeArea_WidgetFlag)) {[m [31m- const iInt2 rootSize = size_Root(d->root);[m [31m- const iInt2 center = divi_I2(rootSize, 2);[m [31m- int top = 0, right = 0, bottom = 0, left = 0;[m [31m- if (d->flags & drawBackgroundToHorizontalSafeArea_WidgetFlag) {[m [31m- const iBool isWide = width_Rect(rect) > rootSize.x * 9 / 10;[m [31m- if (isWide || mid_Rect(rect).x < center.x) {[m [31m- left = -left_Rect(rect);[m [31m- }[m [31m- if (isWide || mid_Rect(rect).x > center.x) {[m [31m- right = rootSize.x - right_Rect(rect);[m [31m- }[m [31m- }[m [31m- if (d->flags & drawBackgroundToVerticalSafeArea_WidgetFlag) {[m [31m- if (top_Rect(rect) > center.y) {[m [31m- bottom = rootSize.y - bottom_Rect(rect);[m [31m- }[m [31m- if (bottom_Rect(rect) < center.y) {[m [31m- top = -top_Rect(rect);[m [31m- }[m [31m- }[m [31m- adjustEdges_Rect(&rect, iMin(0, top), iMax(0, right), iMax(0, bottom), iMin(0, left));[m [31m- }[m [31m-#endif[m fillRect_Paint(&p, rect, d->bgColor);[m }[m if (d->frameColor >= 0 && ~d->flags & frameless_WidgetFlag) {[m [36m@@ -1625,7 +1596,7 @@[m [mstatic void addToPotentiallyVisible_Widget_(const iWidget *d, iPtrArray *pvs, iR[m if (isDrawn_Widget_(d)) {[m iRect bounds = bounds_Widget(d);[m if (d->flags & drawBackgroundToBottom_WidgetFlag) {[m [31m- bounds.size.y += size_Root(d->root).y; // iMax(bounds.size.y, size_Root(d->root).y - top_Rect(bounds));[m [32m+[m[32m bounds.size.y += size_Root(d->root).y;[m }[m if (isFullyContainedByOther_Rect(bounds, *fullyMasked)) {[m return; /* can't be seen */[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).