summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-05-20 11:40:44 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-05-20 11:40:44 +0300
commit709329cef2fe3cd88d6a4e27389b64431f5936f6 (patch)
treef12cafbdb00325030760e2f2d89b5fce4c0177f7 /src/ui/util.c
parent3bbe6b3c73f8c512279b1dd8d164d302d5e96752 (diff)
Dialog show/hide animations
Use the animations introduced for mobile on desktop as well. Adding a preference for this might be prudent.
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index 4b35f8f7..86478300 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1176,6 +1176,7 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) {
1176 postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); 1176 postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg)));
1177 setId_Widget(dlg, ""); /* no further commands to emit */ 1177 setId_Widget(dlg, ""); /* no further commands to emit */
1178 } 1178 }
1179 setupSheetTransition_Mobile(dlg, iFalse);
1179 destroy_Widget(dlg); 1180 destroy_Widget(dlg);
1180 return iTrue; 1181 return iTrue;
1181 } 1182 }
@@ -1184,11 +1185,13 @@ iBool valueInputHandler_(iWidget *dlg, const char *cmd) {
1184 else if (equal_Command(cmd, "cancel")) { 1185 else if (equal_Command(cmd, "cancel")) {
1185 postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg))); 1186 postCommandf_App("valueinput.cancelled id:%s", cstr_String(id_Widget(dlg)));
1186 setId_Widget(dlg, ""); /* no further commands to emit */ 1187 setId_Widget(dlg, ""); /* no further commands to emit */
1188 setupSheetTransition_Mobile(dlg, iFalse);
1187 destroy_Widget(dlg); 1189 destroy_Widget(dlg);
1188 return iTrue; 1190 return iTrue;
1189 } 1191 }
1190 else if (equal_Command(cmd, "valueinput.accept")) { 1192 else if (equal_Command(cmd, "valueinput.accept")) {
1191 acceptValueInput_(dlg); 1193 acceptValueInput_(dlg);
1194 setupSheetTransition_Mobile(dlg, iFalse);
1192 destroy_Widget(dlg); 1195 destroy_Widget(dlg);
1193 return iTrue; 1196 return iTrue;
1194 } 1197 }
@@ -1324,6 +1327,7 @@ static iBool messageHandler_(iWidget *msg, const char *cmd) {
1324 equal_Command(cmd, "scrollbar.fade") || 1327 equal_Command(cmd, "scrollbar.fade") ||
1325 equal_Command(cmd, "widget.overflow") || 1328 equal_Command(cmd, "widget.overflow") ||
1326 startsWith_CStr(cmd, "window."))) { 1329 startsWith_CStr(cmd, "window."))) {
1330 setupSheetTransition_Mobile(msg, iFalse);
1327 destroy_Widget(msg); 1331 destroy_Widget(msg);
1328 } 1332 }
1329 return iFalse; 1333 return iFalse;
@@ -1908,6 +1912,7 @@ static iBool handleBookmarkCreationCommands_SidebarWidget_(iWidget *editor, cons
1908 } 1912 }
1909 postCommand_App("bookmarks.changed"); 1913 postCommand_App("bookmarks.changed");
1910 } 1914 }
1915 setupSheetTransition_Mobile(editor, iFalse);
1911 destroy_Widget(editor); 1916 destroy_Widget(editor);
1912 return iTrue; 1917 return iTrue;
1913 } 1918 }
@@ -1937,6 +1942,7 @@ iWidget *makeBookmarkCreation_Widget(const iString *url, const iString *title, i
1937 1942
1938static iBool handleFeedSettingCommands_(iWidget *dlg, const char *cmd) { 1943static iBool handleFeedSettingCommands_(iWidget *dlg, const char *cmd) {
1939 if (equal_Command(cmd, "cancel")) { 1944 if (equal_Command(cmd, "cancel")) {
1945 setupSheetTransition_Mobile(dlg, iFalse);
1940 destroy_Widget(dlg); 1946 destroy_Widget(dlg);
1941 return iTrue; 1947 return iTrue;
1942 } 1948 }
@@ -1971,6 +1977,7 @@ static iBool handleFeedSettingCommands_(iWidget *dlg, const char *cmd) {
1971 } 1977 }
1972 } 1978 }
1973 postCommand_App("bookmarks.changed"); 1979 postCommand_App("bookmarks.changed");
1980 setupSheetTransition_Mobile(dlg, iFalse);
1974 destroy_Widget(dlg); 1981 destroy_Widget(dlg);
1975 return iTrue; 1982 return iTrue;
1976 } 1983 }