=> edd6555da303a6eb6fc6dc4132a5094625ba27e9
[1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex 2de16e6e..5d74f855 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -59,6 +59,9 @@[m [mstatic const int unlimitedWidth_InputWidget_ = 1000000; /* TODO: WrapText di[m static const iChar sensitiveChar_ = 0x25cf; /* black circle */[m static const char * sensitive_ = "\u25cf";[m [m [32m+[m[32m#define extraPaddingHeight_ ((isPortraitPhone_App() ? 3.0f : 1.25f) * gap_UI) /* phone: proper tap target */[m [32m+[m[32m#define minWidth_InputWidget_ (3 * gap_UI)[m [32m+[m static void enableEditorKeysInMenus_(iBool enable) {[m #if defined (iPlatformAppleDesktop)[m enableMenuItemsByKey_MacOS(SDLK_LEFT, KMOD_PRIMARY, enable);[m [36m@@ -228,7 +231,7 @@[m [mstruct Impl_InputWidget {[m size_t maxLen; /* characters */[m iString srcHint;[m iString hint;[m [31m- int leftPadding;[m [32m+[m[32m int leftPadding; /* additional padding between frame and content */[m int rightPadding;[m int minWrapLines, maxWrapLines; /* min/max number of visible lines allowed */[m iRangei visWrapLines; /* which wrap lines are current visible */[m [36m@@ -359,8 +362,6 @@[m [mstatic const iInputLine *line_InputWidget_(const iInputWidget *d, size_t index)[m [m #endif /* !LAGRANGE_USE_SYSTEM_TEXT_INPUT */[m [m [31m-#define extraPaddingHeight_ (1.25f * gap_UI)[m [31m-[m static iRect contentBounds_InputWidget_(const iInputWidget *d) {[m const iWidget *w = constAs_Widget(d);[m iRect bounds = adjusted_Rect(bounds_Widget(w),[m [36m@@ -374,8 +375,6 @@[m [mstatic iRect contentBounds_InputWidget_(const iInputWidget *d) {[m return bounds;[m }[m [m [31m-#define minWidth_InputWidget_ (3 * gap_UI)[m [31m-[m static iWrapText wrap_InputWidget_(const iInputWidget *d, int y) {[m #if LAGRANGE_USE_SYSTEM_TEXT_INPUT[m iUnused(y); /* full text is wrapped always */[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 5ec63e91..d5148056 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -650,10 +650,10 @@[m [mstatic void checkLoadAnimation_Root_(iRoot *d) {[m [m void updatePadding_Root(iRoot *d) {[m if (d == NULL) return;[m [31m- iWidget *toolBar = findChild_Widget(d->widget, "toolbar");[m [31m- float bottom = 0.0f;[m #if defined (iPlatformAppleMobile)[m [32m+[m[32m iWidget *toolBar = findChild_Widget(d->widget, "toolbar");[m float left, top, right;[m [32m+[m[32m float bottom = 0.0f;[m safeAreaInsets_iOS(&left, &top, &right, &bottom);[m /* Respect the safe area insets. */ {[m setPadding_Widget(findChild_Widget(d->widget, "navdiv"), left, top, right, 0);[m [36m@@ -662,15 +662,6 @@[m [mvoid updatePadding_Root(iRoot *d) {[m }[m }[m #endif[m [31m-// if (toolBar) {[m [31m- /* TODO: get this from toolBar height, but it's buggy for some reason */[m [31m-// const int sidebarBottomPad = isPortrait_App() ? 11 * gap_UI + bottom : 0;[m [31m-// setPadding_Widget(findChild_Widget(d->widget, "sidebar"), 0, 0, 0, sidebarBottomPad);[m [31m- //setPadding_Widget(findChild_Widget(d->widget, "sidebar2"), 0, 0, 0, sidebarBottomPad);[m [31m- /* TODO: There seems to be unrelated layout glitch in the sidebar where its children[m [31m- are not arranged correctly until it's hidden and reshown. */[m [31m-// }[m [31m- /* Note that `handleNavBarCommands_` also adjusts padding and spacing. */[m }[m [m void updateToolbarColors_Root(iRoot *d) {[m [36m@@ -773,9 +764,8 @@[m [mstatic void updateNavBarSize_(iWidget *navBar) {[m const iBool isPhone = deviceType_App() == phone_AppDeviceType;[m const iBool isNarrow = !isPhone && isNarrow_Root(navBar->root);[m /* Adjust navbar padding. */ {[m [31m- int hPad = isPhone && isPortrait_App() ? 0 : (isPhone || isNarrow) ? gap_UI / 2[m [31m- : gap_UI * 3 / 2;[m [31m- int vPad = gap_UI * 3 / 2;[m [32m+[m[32m int hPad = isPortraitPhone_App() ? 0 : isPhone || isNarrow ? gap_UI / 2 : (gap_UI * 3 / 2);[m [32m+[m[32m int vPad = gap_UI * 3 / 2;[m int topPad = !findWidget_Root("winbar") ? gap_UI / 2 : 0;[m setPadding_Widget(navBar, hPad, vPad / 3 + topPad, hPad, vPad / 2);[m }[m [36m@@ -1162,7 +1152,7 @@[m [mvoid updateMetrics_Root(iRoot *d) {[m iWidget *urlButtons = findChild_Widget(navBar, "url.buttons");[m iLabelWidget *idName = findChild_Widget(d->widget, "toolbar.name");[m setPadding_Widget(as_Widget(url), 0, gap_UI, 0, gap_UI);[m [31m- navBar->rect.size.y = 0; /* recalculate height based on children (FIXME: shouldn't be needed) */[m [32m+[m[32m// navBar->rect.size.y = 0; /* recalculate height based on children (FIXME: shouldn't be needed) */[m setFixedSize_Widget(embedPad, init_I2(width_Widget(urlButtons) + gap_UI / 2, 1));[m rightEmbed->rect.pos.y = gap_UI;[m updatePadding_Root(d);[m [36m@@ -1403,13 +1393,15 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m setFont_LabelWidget(pageMenuButton, uiContentBold_FontId);[m setAlignVisually_LabelWidget(pageMenuButton, iTrue);[m addChildFlags_Widget(urlButtons, iClob(pageMenuButton),[m [31m- embedFlags | tight_WidgetFlag | collapse_WidgetFlag);[m [32m+[m[32m embedFlags | tight_WidgetFlag | collapse_WidgetFlag |[m [32m+[m[32m resizeToParentHeight_WidgetFlag);[m updateSize_LabelWidget(pageMenuButton);[m }[m /* Reload button. */ {[m iLabelWidget *reload = newIcon_LabelWidget(reloadCStr_, 0, 0, "navigate.reload");[m setId_Widget(as_Widget(reload), "reload");[m [31m- addChildFlags_Widget(urlButtons, iClob(reload), embedFlags | collapse_WidgetFlag);[m [32m+[m[32m addChildFlags_Widget(urlButtons, iClob(reload), embedFlags | collapse_WidgetFlag |[m [32m+[m[32m resizeToParentHeight_WidgetFlag);[m updateSize_LabelWidget(reload);[m }[m addChildFlags_Widget(as_Widget(url), iClob(urlButtons), moveToParentRightEdge_WidgetFlag);[m [1mdiff --git a/src/ui/widget.h b/src/ui/widget.h[m [1mindex 4ab8d602..eb3004dc 100644[m [1m--- a/src/ui/widget.h[m [1m+++ b/src/ui/widget.h[m [36m@@ -237,6 +237,24 @@[m [miLocalDef int height_Widget(const iAnyObject *d) {[m }[m return 0;[m }[m [32m+[m[32miLocalDef int leftPad_Widget(const iWidget *d) {[m [32m+[m[32m return d->padding[0];[m [32m+[m[32m}[m [32m+[m[32miLocalDef int topPad_Widget(const iWidget *d) {[m [32m+[m[32m return d->padding[1];[m [32m+[m[32m}[m [32m+[m[32miLocalDef int rightPad_Widget(const iWidget *d) {[m [32m+[m[32m return d->padding[2];[m [32m+[m[32m}[m [32m+[m[32miLocalDef int bottomPad_Widget(const iWidget *d) {[m [32m+[m[32m return d->padding[3];[m [32m+[m[32m}[m [32m+[m[32miLocalDef iInt2 tlPad_Widget(const iWidget *d) {[m [32m+[m[32m return init_I2(leftPad_Widget(d), topPad_Widget(d));[m [32m+[m[32m}[m [32m+[m[32miLocalDef iInt2 brPad_Widget(const iWidget *d) {[m [32m+[m[32m return init_I2(rightPad_Widget(d), bottomPad_Widget(d));[m [32m+[m[32m}[m iLocalDef iObjectList *children_Widget(iAnyObject *d) {[m if (d == NULL) return NULL;[m iAssert(isInstance_Object(d, &Class_Widget));[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).