summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c9
-rw-r--r--src/ui/util.c17
2 files changed, 20 insertions, 6 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index a467df10..d2a97371 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1615,7 +1615,14 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) {
1615 : cstr_String(&resp->meta), 1615 : cstr_String(&resp->meta),
1616 uiTextCaution_ColorEscape "${dlg.input.send}", 1616 uiTextCaution_ColorEscape "${dlg.input.send}",
1617 format_CStr("!document.input.submit doc:%p", d)); 1617 format_CStr("!document.input.submit doc:%p", d));
1618 setId_Widget(addChildPosFlags_Widget(findChild_Widget(dlg, "dialogbuttons"), 1618 iWidget *buttons = findChild_Widget(dlg, "dialogbuttons");
1619 iLabelWidget *lineBreak =
1620 insertChildAfter_Widget(buttons, iClob(new_LabelWidget("${dlg.input.linebreak}"
1621 uiTextAction_ColorEscape
1622 " " shiftReturn_Icon,
1623 NULL)), 0);
1624 setTextColor_LabelWidget(lineBreak, uiTextDim_ColorId);
1625 setId_Widget(addChildPosFlags_Widget(buttons,
1619 iClob(new_LabelWidget("", NULL)), 1626 iClob(new_LabelWidget("", NULL)),
1620 front_WidgetAddPos, frameless_WidgetFlag), 1627 front_WidgetAddPos, frameless_WidgetFlag),
1621 "valueinput.counter"); 1628 "valueinput.counter");
diff --git a/src/ui/util.c b/src/ui/util.c
index 7156b445..93afeb4a 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -80,7 +80,7 @@ void toString_Sym(int key, int kmods, iString *str) {
80 appendChar_String(str, 0x2325); 80 appendChar_String(str, 0x2325);
81 } 81 }
82 if (kmods & KMOD_SHIFT) { 82 if (kmods & KMOD_SHIFT) {
83 appendChar_String(str, 0x21e7); 83 appendCStr_String(str, shift_Icon);
84 } 84 }
85 if (kmods & KMOD_GUI) { 85 if (kmods & KMOD_GUI) {
86 appendChar_String(str, 0x2318); 86 appendChar_String(str, 0x2318);
@@ -93,7 +93,7 @@ void toString_Sym(int key, int kmods, iString *str) {
93 appendCStr_String(str, "Alt+"); 93 appendCStr_String(str, "Alt+");
94 } 94 }
95 if (kmods & KMOD_SHIFT) { 95 if (kmods & KMOD_SHIFT) {
96 appendCStr_String(str, "Shift+"); 96 appendCStr_String(str, shift_Icon "+");
97 } 97 }
98 if (kmods & KMOD_GUI) { 98 if (kmods & KMOD_GUI) {
99 appendCStr_String(str, "Meta+"); 99 appendCStr_String(str, "Meta+");
@@ -138,7 +138,7 @@ void toString_Sym(int key, int kmods, iString *str) {
138 } 138 }
139 else if (key == SDLK_RETURN) { 139 else if (key == SDLK_RETURN) {
140 removePlus_(str); 140 removePlus_(str);
141 appendChar_String(str, 0x21a9); /* Leftwards arrow with a hook */ 141 appendCStr_String(str, return_Icon); /* Leftwards arrow with a hook */
142 } 142 }
143 else { 143 else {
144 appendCStr_String(str, SDL_GetKeyName(key)); 144 appendCStr_String(str, SDL_GetKeyName(key));
@@ -904,7 +904,7 @@ static iBool isTabPage_Widget_(const iWidget *tabs, const iWidget *page) {
904static void unfocusFocusInsideTabPage_(const iWidget *page) { 904static void unfocusFocusInsideTabPage_(const iWidget *page) {
905 iWidget *focus = focus_Widget(); 905 iWidget *focus = focus_Widget();
906 if (page && focus && hasParent_Widget(focus, page)) { 906 if (page && focus && hasParent_Widget(focus, page)) {
907 printf("unfocus inside page: %p\n", focus); 907// printf("unfocus inside page: %p\n", focus);
908 setFocus_Widget(NULL); 908 setFocus_Widget(NULL);
909 } 909 }
910} 910}
@@ -1806,7 +1806,8 @@ static void updateValueInputWidth_(iWidget *dlg) {
1806 dlg->rect.size.x = rootSize.x; 1806 dlg->rect.size.x = rootSize.x;
1807 } 1807 }
1808 else { 1808 else {
1809 dlg->rect.size.x = iMaxi(iMaxi(rootSize.x / 2, title->rect.size.x), prompt->rect.size.x); 1809 dlg->rect.size.x =
1810 iMaxi(iMaxi(iMin(rootSize.x, 100 * gap_UI), title->rect.size.x), prompt->rect.size.x);
1810 } 1811 }
1811} 1812}
1812 1813
@@ -1880,6 +1881,12 @@ iWidget *makeDialogButtons_Widget(const iMenuItem *actions, size_t numActions) {
1880 if (*label == '*' || *label == '&') { 1881 if (*label == '*' || *label == '&') {
1881 continue; /* Special value selection items for a Question dialog. */ 1882 continue; /* Special value selection items for a Question dialog. */
1882 } 1883 }
1884 if (startsWith_CStr(label, "```")) {
1885 /* Annotation. */
1886 iLabelWidget *annotation = addChild_Widget(div, iClob(new_LabelWidget(label + 3, NULL)));
1887 setTextColor_LabelWidget(annotation, uiTextAction_ColorId);
1888 continue;
1889 }
1883 if (!iCmpStr(label, "---")) { 1890 if (!iCmpStr(label, "---")) {
1884 /* Separator.*/ 1891 /* Separator.*/
1885 addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag); 1892 addChildFlags_Widget(div, iClob(new_Widget()), expand_WidgetFlag);