diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/inputwidget.c | 4 | ||||
-rw-r--r-- | src/ui/util.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c index f4302887..27f0217c 100644 --- a/src/ui/inputwidget.c +++ b/src/ui/inputwidget.c | |||
@@ -123,7 +123,9 @@ static void updateMetrics_InputWidget_(iInputWidget *d) { | |||
123 | w->rect.size.y += 2 * gap_UI; | 123 | w->rect.size.y += 2 * gap_UI; |
124 | #endif | 124 | #endif |
125 | invalidateBuffered_InputWidget_(d); | 125 | invalidateBuffered_InputWidget_(d); |
126 | arrange_Widget(w); | 126 | if (parent_Widget(w)) { |
127 | arrange_Widget(w); | ||
128 | } | ||
127 | } | 129 | } |
128 | 130 | ||
129 | void init_InputWidget(iInputWidget *d, size_t maxLen) { | 131 | void init_InputWidget(iInputWidget *d, size_t maxLen) { |
diff --git a/src/ui/util.c b/src/ui/util.c index adb3c4b4..a2aaa893 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1462,7 +1462,6 @@ static void updateValueInputWidth_(iWidget *dlg) { | |||
1462 | else { | 1462 | else { |
1463 | dlg->rect.size.x = iMaxi(iMaxi(rootSize.x / 2, title->rect.size.x), prompt->rect.size.x); | 1463 | dlg->rect.size.x = iMaxi(iMaxi(rootSize.x / 2, title->rect.size.x), prompt->rect.size.x); |
1464 | } | 1464 | } |
1465 | as_Widget(findChild_Widget(dlg, "input"))->rect.size.x = dlg->rect.size.x; | ||
1466 | } | 1465 | } |
1467 | 1466 | ||
1468 | iBool valueInputHandler_(iWidget *dlg, const char *cmd) { | 1467 | iBool valueInputHandler_(iWidget *dlg, const char *cmd) { |
@@ -1470,6 +1469,7 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) { | |||
1470 | if (equal_Command(cmd, "window.resized")) { | 1469 | if (equal_Command(cmd, "window.resized")) { |
1471 | if (isVisible_Widget(dlg)) { | 1470 | if (isVisible_Widget(dlg)) { |
1472 | updateValueInputWidth_(dlg); | 1471 | updateValueInputWidth_(dlg); |
1472 | arrange_Widget(dlg); | ||
1473 | } | 1473 | } |
1474 | return iFalse; | 1474 | return iFalse; |
1475 | } | 1475 | } |
@@ -1574,7 +1574,8 @@ iWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con | |||
1574 | setId_Widget( | 1574 | setId_Widget( |
1575 | addChildFlags_Widget(dlg, iClob(new_LabelWidget(prompt, NULL)), frameless_WidgetFlag), | 1575 | addChildFlags_Widget(dlg, iClob(new_LabelWidget(prompt, NULL)), frameless_WidgetFlag), |
1576 | "valueinput.prompt"); | 1576 | "valueinput.prompt"); |
1577 | iInputWidget *input = addChildFlags_Widget(dlg, iClob(new_InputWidget(0)), 0); | 1577 | iInputWidget *input = addChildFlags_Widget(dlg, iClob(new_InputWidget(0)), |
1578 | resizeToParentWidth_WidgetFlag); | ||
1578 | setContentPadding_InputWidget(input, 0.5f * gap_UI, 0.5f * gap_UI); | 1579 | setContentPadding_InputWidget(input, 0.5f * gap_UI, 0.5f * gap_UI); |
1579 | if (deviceType_App() == phone_AppDeviceType) { | 1580 | if (deviceType_App() == phone_AppDeviceType) { |
1580 | setFont_InputWidget(input, defaultBig_FontId); | 1581 | setFont_InputWidget(input, defaultBig_FontId); |