diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-11 07:43:57 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-11 07:43:57 +0300 |
commit | 1410bbde7779efe3a20f603523547c8b8f55b6a1 (patch) | |
tree | 54e8ab43ea6d3dc35d7993b6909096c6c8429e50 /src/ui/util.c | |
parent | 61c23be799956615ceeeda10aaeccc2bb11e9c94 (diff) |
Mobile: Many UI improvements; Upload UI
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index b875e260..6069e800 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1061,6 +1061,7 @@ iWidget *removeTabPage_Widget(iWidget *tabs, size_t index) { | |||
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | void resizeToLargestPage_Widget(iWidget *tabs) { | 1063 | void resizeToLargestPage_Widget(iWidget *tabs) { |
1064 | if (!tabs) return; | ||
1064 | // puts("RESIZE TO LARGEST PAGE ..."); | 1065 | // puts("RESIZE TO LARGEST PAGE ..."); |
1065 | iWidget *pages = findChild_Widget(tabs, "tabs.pages"); | 1066 | iWidget *pages = findChild_Widget(tabs, "tabs.pages"); |
1066 | iForEach(ObjectList, i, children_Widget(pages)) { | 1067 | iForEach(ObjectList, i, children_Widget(pages)) { |
@@ -1216,7 +1217,7 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) { | |||
1216 | postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); | 1217 | postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); |
1217 | setId_Widget(dlg, ""); /* no further commands to emit */ | 1218 | setId_Widget(dlg, ""); /* no further commands to emit */ |
1218 | } | 1219 | } |
1219 | setupSheetTransition_Mobile(dlg, iFalse); | 1220 | setupSheetTransition_Mobile(dlg, top_TransitionDir); |
1220 | destroy_Widget(dlg); | 1221 | destroy_Widget(dlg); |
1221 | return iTrue; | 1222 | return iTrue; |
1222 | } | 1223 | } |
@@ -1225,13 +1226,13 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) { | |||
1225 | else if (equal_Command(cmd, "valueinput.cancel")) { | 1226 | else if (equal_Command(cmd, "valueinput.cancel")) { |
1226 | postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); | 1227 | postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); |
1227 | setId_Widget(dlg, ""); /* no further commands to emit */ | 1228 | setId_Widget(dlg, ""); /* no further commands to emit */ |
1228 | setupSheetTransition_Mobile(dlg, iFalse); | 1229 | setupSheetTransition_Mobile(dlg, top_TransitionDir); |
1229 | destroy_Widget(dlg); | 1230 | destroy_Widget(dlg); |
1230 | return iTrue; | 1231 | return iTrue; |
1231 | } | 1232 | } |
1232 | else if (equal_Command(cmd, "valueinput.accept")) { | 1233 | else if (equal_Command(cmd, "valueinput.accept")) { |
1233 | acceptValueInput_(dlg); | 1234 | acceptValueInput_(dlg); |
1234 | setupSheetTransition_Mobile(dlg, iFalse); | 1235 | setupSheetTransition_Mobile(dlg, top_TransitionDir); |
1235 | destroy_Widget(dlg); | 1236 | destroy_Widget(dlg); |
1236 | return iTrue; | 1237 | return iTrue; |
1237 | } | 1238 | } |
@@ -1345,7 +1346,9 @@ iWidget *makeValueInput_Widget(iWidget *parent, const iString *initialValue, con | |||
1345 | acceptKeyMod_ReturnKeyBehavior(prefs_App()->returnKey), | 1346 | acceptKeyMod_ReturnKeyBehavior(prefs_App()->returnKey), |
1346 | "valueinput.accept" } }, | 1347 | "valueinput.accept" } }, |
1347 | 2))); | 1348 | 2))); |
1348 | finalizeSheet_Mobile(dlg); | 1349 | // finalizeSheet_Mobile(dlg); |
1350 | arrange_Widget(dlg); | ||
1351 | setupSheetTransition_Mobile(dlg, incoming_TransitionFlag | top_TransitionDir); | ||
1349 | if (parent) { | 1352 | if (parent) { |
1350 | setFocus_Widget(as_Widget(input)); | 1353 | setFocus_Widget(as_Widget(input)); |
1351 | } | 1354 | } |
@@ -1915,6 +1918,7 @@ iWidget *makePreferences_Widget(void) { | |||
1915 | { NULL } | 1918 | { NULL } |
1916 | }; | 1919 | }; |
1917 | iWidget *dlg = makePanels_Mobile("prefs", (iMenuItem[]){ | 1920 | iWidget *dlg = makePanels_Mobile("prefs", (iMenuItem[]){ |
1921 | { "title id:heading.settings" }, | ||
1918 | { "panel text:" gear_Icon " ${heading.prefs.general}", 0, 0, (const void *) generalPanelItems }, | 1922 | { "panel text:" gear_Icon " ${heading.prefs.general}", 0, 0, (const void *) generalPanelItems }, |
1919 | { "panel icon:0x1f5a7 id:heading.prefs.network", 0, 0, (const void *) networkPanelItems }, | 1923 | { "panel icon:0x1f5a7 id:heading.prefs.network", 0, 0, (const void *) networkPanelItems }, |
1920 | { "panel text:" person_Icon " ${sidebar.identities}", 0, 0, (const void *) identityPanelItems }, | 1924 | { "panel text:" person_Icon " ${sidebar.identities}", 0, 0, (const void *) identityPanelItems }, |
@@ -2405,7 +2409,7 @@ iWidget *makeFeedSettings_Widget(uint32_t bookmarkId) { | |||
2405 | arrange_Widget(dlg); | 2409 | arrange_Widget(dlg); |
2406 | as_Widget(input)->rect.size.x = 100 * gap_UI - headings->rect.size.x; | 2410 | as_Widget(input)->rect.size.x = 100 * gap_UI - headings->rect.size.x; |
2407 | addChild_Widget(get_Root()->widget, iClob(dlg)); | 2411 | addChild_Widget(get_Root()->widget, iClob(dlg)); |
2408 | finalizeSheet_Mobile(dlg); | 2412 | // finalizeSheet_Mobile(dlg); |
2409 | } | 2413 | } |
2410 | /* Initialize. */ { | 2414 | /* Initialize. */ { |
2411 | const iBookmark *bm = bookmarkId ? get_Bookmarks(bookmarks_App(), bookmarkId) : NULL; | 2415 | const iBookmark *bm = bookmarkId ? get_Bookmarks(bookmarks_App(), bookmarkId) : NULL; |
@@ -2419,6 +2423,7 @@ iWidget *makeFeedSettings_Widget(uint32_t bookmarkId) { | |||
2419 | iTrue); | 2423 | iTrue); |
2420 | setCommandHandler_Widget(dlg, handleFeedSettingCommands_); | 2424 | setCommandHandler_Widget(dlg, handleFeedSettingCommands_); |
2421 | } | 2425 | } |
2426 | setupSheetTransition_Mobile(dlg, incoming_TransitionFlag); | ||
2422 | return dlg; | 2427 | return dlg; |
2423 | } | 2428 | } |
2424 | 2429 | ||