Lagrange [release]

Widget: Flag for allowing horizontal overflow

f50c73573c4e8ddec450a05192b8d950f026941d
diff --git a/src/ui/util.c b/src/ui/util.c
index 60618181..41b8f65c 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1837,8 +1837,9 @@ static iWidget *appendTwoColumnPage_(iWidget *tabs, const char *title, int short
 }
 
 static void makeTwoColumnHeading_(const char *title, iWidget *headings, iWidget *values) {
-    addChild_Widget(headings,
-                    iClob(makeHeading_Widget(format_CStr(uiHeading_ColorEscape "%s", title))));
+    addChildFlags_Widget(headings,
+                         iClob(makeHeading_Widget(format_CStr(uiHeading_ColorEscape "%s", title))),
+                         ignoreForParentWidth_WidgetFlag);
     addChild_Widget(values, iClob(makeHeading_Widget("")));
 }
 
@@ -1984,9 +1985,6 @@ iWidget *makePreferences_Widget(void) {
         setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale");
         addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.retainwindow}")));
         addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow")));
-        makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values);
-        addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}")));
-        addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon")));
     }
     /* Colors. */ {
         appendTwoColumnPage_(tabs, "${heading.prefs.colors}", '3', &headings, &values);
@@ -2063,6 +2061,9 @@ iWidget *makePreferences_Widget(void) {
         addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
         addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}")));
         addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede")));
+        makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values);
+        addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}")));
+        addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon")));
     }
     /* Network. */ {
         appendTwoColumnPage_(tabs, "${heading.prefs.network}", '5', &headings, &values);
diff --git a/src/ui/widget.c b/src/ui/widget.c
index e19a9482..91f6c12d 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -519,11 +519,15 @@ void arrange_Widget(iWidget *d) {
             if (isCollapsed_Widget_(child)) {
                 continue;
             }
+            iRect childRect = child->rect;
+            if (child->flags & ignoreForParentWidth_WidgetFlag) {
+                childRect.size.x = 0;
+            }
             if (isEmpty_Rect(bounds)) {
-                bounds = child->rect;
+                bounds = childRect;
             }
             else {
-                bounds = union_Rect(bounds, child->rect);
+                bounds = union_Rect(bounds, childRect);
             }
         }
         adjustEdges_Rect(&bounds, -d->padding[1], d->padding[2], d->padding[3], -d->padding[0]);
diff --git a/src/ui/widget.h b/src/ui/widget.h
index ad7ce168..bde13272 100644
--- a/src/ui/widget.h
+++ b/src/ui/widget.h
@@ -112,6 +112,7 @@ enum iWidgetFlag {
 #define safePadding_WidgetFlag              iBit64(56) /* padded using safe area insets */
 #define moveToParentBottomEdge_WidgetFlag   iBit64(57)
 #define parentCannotResizeHeight_WidgetFlag iBit64(58)
+#define ignoreForParentWidth_WidgetFlag     iBit64(59)
 
 enum iWidgetAddPos {
     back_WidgetAddPos,