summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/util.c11
-rw-r--r--src/ui/widget.c8
-rw-r--r--src/ui/widget.h1
3 files changed, 13 insertions, 7 deletions
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
1837} 1837}
1838 1838
1839static void makeTwoColumnHeading_(const char *title, iWidget *headings, iWidget *values) { 1839static void makeTwoColumnHeading_(const char *title, iWidget *headings, iWidget *values) {
1840 addChild_Widget(headings, 1840 addChildFlags_Widget(headings,
1841 iClob(makeHeading_Widget(format_CStr(uiHeading_ColorEscape "%s", title)))); 1841 iClob(makeHeading_Widget(format_CStr(uiHeading_ColorEscape "%s", title))),
1842 ignoreForParentWidth_WidgetFlag);
1842 addChild_Widget(values, iClob(makeHeading_Widget(""))); 1843 addChild_Widget(values, iClob(makeHeading_Widget("")));
1843} 1844}
1844 1845
@@ -1984,9 +1985,6 @@ iWidget *makePreferences_Widget(void) {
1984 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); 1985 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale");
1985 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.retainwindow}"))); 1986 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.retainwindow}")));
1986 addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow"))); 1987 addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow")));
1987 makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values);
1988 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}")));
1989 addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon")));
1990 } 1988 }
1991 /* Colors. */ { 1989 /* Colors. */ {
1992 appendTwoColumnPage_(tabs, "${heading.prefs.colors}", '3', &headings, &values); 1990 appendTwoColumnPage_(tabs, "${heading.prefs.colors}", '3', &headings, &values);
@@ -2063,6 +2061,9 @@ iWidget *makePreferences_Widget(void) {
2063 addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); 2061 addChildFlags_Widget(values, iClob(quote), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
2064 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}"))); 2062 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.biglede}")));
2065 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); 2063 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede")));
2064 makeTwoColumnHeading_("${heading.prefs.widelayout}", headings, values);
2065 addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.sideicon}")));
2066 addChild_Widget(values, iClob(makeToggle_Widget("prefs.sideicon")));
2066 } 2067 }
2067 /* Network. */ { 2068 /* Network. */ {
2068 appendTwoColumnPage_(tabs, "${heading.prefs.network}", '5', &headings, &values); 2069 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) {
519 if (isCollapsed_Widget_(child)) { 519 if (isCollapsed_Widget_(child)) {
520 continue; 520 continue;
521 } 521 }
522 iRect childRect = child->rect;
523 if (child->flags & ignoreForParentWidth_WidgetFlag) {
524 childRect.size.x = 0;
525 }
522 if (isEmpty_Rect(bounds)) { 526 if (isEmpty_Rect(bounds)) {
523 bounds = child->rect; 527 bounds = childRect;
524 } 528 }
525 else { 529 else {
526 bounds = union_Rect(bounds, child->rect); 530 bounds = union_Rect(bounds, childRect);
527 } 531 }
528 } 532 }
529 adjustEdges_Rect(&bounds, -d->padding[1], d->padding[2], d->padding[3], -d->padding[0]); 533 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 {
112#define safePadding_WidgetFlag iBit64(56) /* padded using safe area insets */ 112#define safePadding_WidgetFlag iBit64(56) /* padded using safe area insets */
113#define moveToParentBottomEdge_WidgetFlag iBit64(57) 113#define moveToParentBottomEdge_WidgetFlag iBit64(57)
114#define parentCannotResizeHeight_WidgetFlag iBit64(58) 114#define parentCannotResizeHeight_WidgetFlag iBit64(58)
115#define ignoreForParentWidth_WidgetFlag iBit64(59)
115 116
116enum iWidgetAddPos { 117enum iWidgetAddPos {
117 back_WidgetAddPos, 118 back_WidgetAddPos,