diff options
-rw-r--r-- | src/ui/mobile.c | 4 | ||||
-rw-r--r-- | src/ui/root.c | 4 | ||||
-rw-r--r-- | src/ui/sidebarwidget.c | 34 | ||||
-rw-r--r-- | src/ui/sidebarwidget.h | 4 | ||||
-rw-r--r-- | src/ui/touch.c | 5 | ||||
-rw-r--r-- | src/ui/util.c | 2 | ||||
-rw-r--r-- | src/ui/widget.c | 18 | ||||
-rw-r--r-- | src/ui/widget.h | 4 |
8 files changed, 44 insertions, 31 deletions
diff --git a/src/ui/mobile.c b/src/ui/mobile.c index 7794d686..1bf289a7 100644 --- a/src/ui/mobile.c +++ b/src/ui/mobile.c | |||
@@ -120,7 +120,7 @@ static iBool mainDetailSplitHandler_(iWidget *mainDetailSplit, const char *cmd) | |||
120 | } | 120 | } |
121 | iForEach(ObjectList, i, children_Widget(detailStack)) { | 121 | iForEach(ObjectList, i, children_Widget(detailStack)) { |
122 | iWidget *panel = i.object; | 122 | iWidget *panel = i.object; |
123 | setFlags_Widget(panel, edgeDraggable_WidgetFlag, !isSideBySide); | 123 | setFlags_Widget(panel, leftEdgeDraggable_WidgetFlag, !isSideBySide); |
124 | if (isSideBySide) { | 124 | if (isSideBySide) { |
125 | setVisualOffset_Widget(panel, 0, 0, 0); | 125 | setVisualOffset_Widget(panel, 0, 0, 0); |
126 | } | 126 | } |
@@ -414,7 +414,7 @@ void finalizeSheet_Mobile(iWidget *sheet) { | |||
414 | setFlags_Widget(sheet, | 414 | setFlags_Widget(sheet, |
415 | frameless_WidgetFlag | | 415 | frameless_WidgetFlag | |
416 | //resizeWidthOfChildren_WidgetFlag | | 416 | //resizeWidthOfChildren_WidgetFlag | |
417 | edgeDraggable_WidgetFlag | | 417 | leftEdgeDraggable_WidgetFlag | |
418 | commandOnClick_WidgetFlag, | 418 | commandOnClick_WidgetFlag, |
419 | iTrue); | 419 | iTrue); |
420 | iPtrArray * contents = collect_PtrArray(new_PtrArray()); /* two-column pages */ | 420 | iPtrArray * contents = collect_PtrArray(new_PtrArray()); /* two-column pages */ |
diff --git a/src/ui/root.c b/src/ui/root.c index 76f4c0d7..2d69970d 100644 --- a/src/ui/root.c +++ b/src/ui/root.c | |||
@@ -1185,9 +1185,9 @@ void createUserInterface_Root(iRoot *d) { | |||
1185 | } | 1185 | } |
1186 | /* Sidebars. */ { | 1186 | /* Sidebars. */ { |
1187 | iWidget *content = findChild_Widget(root, "tabs.content"); | 1187 | iWidget *content = findChild_Widget(root, "tabs.content"); |
1188 | iSidebarWidget *sidebar1 = new_SidebarWidget(left_SideBarSide); | 1188 | iSidebarWidget *sidebar1 = new_SidebarWidget(left_SidebarSide); |
1189 | addChildPos_Widget(content, iClob(sidebar1), front_WidgetAddPos); | 1189 | addChildPos_Widget(content, iClob(sidebar1), front_WidgetAddPos); |
1190 | iSidebarWidget *sidebar2 = new_SidebarWidget(right_SideBarSide); | 1190 | iSidebarWidget *sidebar2 = new_SidebarWidget(right_SidebarSide); |
1191 | if (deviceType_App() != phone_AppDeviceType) { | 1191 | if (deviceType_App() != phone_AppDeviceType) { |
1192 | addChildPos_Widget(content, iClob(sidebar2), back_WidgetAddPos); | 1192 | addChildPos_Widget(content, iClob(sidebar2), back_WidgetAddPos); |
1193 | } | 1193 | } |
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 2e1e138e..4f3ea637 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -625,7 +625,7 @@ static void updateMetrics_SidebarWidget_(iSidebarWidget *d) { | |||
625 | void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { | 625 | void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { |
626 | iWidget *w = as_Widget(d); | 626 | iWidget *w = as_Widget(d); |
627 | init_Widget(w); | 627 | init_Widget(w); |
628 | setId_Widget(w, side == left_SideBarSide ? "sidebar" : "sidebar2"); | 628 | setId_Widget(w, side == left_SidebarSide ? "sidebar" : "sidebar2"); |
629 | initCopy_String(&d->cmdPrefix, id_Widget(w)); | 629 | initCopy_String(&d->cmdPrefix, id_Widget(w)); |
630 | appendChar_String(&d->cmdPrefix, '.'); | 630 | appendChar_String(&d->cmdPrefix, '.'); |
631 | setBackgroundColor_Widget(w, none_ColorId); | 631 | setBackgroundColor_Widget(w, none_ColorId); |
@@ -659,7 +659,7 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { | |||
659 | d->actions = NULL; | 659 | d->actions = NULL; |
660 | /* On a phone, the right sidebar is used exclusively for Identities. */ | 660 | /* On a phone, the right sidebar is used exclusively for Identities. */ |
661 | const iBool isPhone = deviceType_App() == phone_AppDeviceType; | 661 | const iBool isPhone = deviceType_App() == phone_AppDeviceType; |
662 | if (!isPhone || d->side == left_SideBarSide) { | 662 | if (!isPhone || d->side == left_SidebarSide) { |
663 | iWidget *buttons = new_Widget(); | 663 | iWidget *buttons = new_Widget(); |
664 | setId_Widget(buttons, "buttons"); | 664 | setId_Widget(buttons, "buttons"); |
665 | for (int i = 0; i < max_SidebarMode; i++) { | 665 | for (int i = 0; i < max_SidebarMode; i++) { |
@@ -715,24 +715,24 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { | |||
715 | addChildFlags_Widget(content, iClob(d->blank), resizeChildren_WidgetFlag); | 715 | addChildFlags_Widget(content, iClob(d->blank), resizeChildren_WidgetFlag); |
716 | addChildFlags_Widget(vdiv, iClob(content), expand_WidgetFlag); | 716 | addChildFlags_Widget(vdiv, iClob(content), expand_WidgetFlag); |
717 | setMode_SidebarWidget(d, | 717 | setMode_SidebarWidget(d, |
718 | deviceType_App() == phone_AppDeviceType && d->side == right_SideBarSide ? | 718 | deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide ? |
719 | identities_SidebarMode : bookmarks_SidebarMode); | 719 | identities_SidebarMode : bookmarks_SidebarMode); |
720 | d->resizer = | 720 | d->resizer = |
721 | addChildFlags_Widget(w, | 721 | addChildFlags_Widget(w, |
722 | iClob(new_Widget()), | 722 | iClob(new_Widget()), |
723 | hover_WidgetFlag | commandOnClick_WidgetFlag | fixedWidth_WidgetFlag | | 723 | hover_WidgetFlag | commandOnClick_WidgetFlag | fixedWidth_WidgetFlag | |
724 | resizeToParentHeight_WidgetFlag | | 724 | resizeToParentHeight_WidgetFlag | |
725 | (side == left_SideBarSide ? moveToParentRightEdge_WidgetFlag | 725 | (side == left_SidebarSide ? moveToParentRightEdge_WidgetFlag |
726 | : moveToParentLeftEdge_WidgetFlag)); | 726 | : moveToParentLeftEdge_WidgetFlag)); |
727 | if (deviceType_App() == phone_AppDeviceType) { | 727 | if (deviceType_App() == phone_AppDeviceType) { |
728 | setFlags_Widget(d->resizer, hidden_WidgetFlag | disabled_WidgetFlag, iTrue); | 728 | setFlags_Widget(d->resizer, hidden_WidgetFlag | disabled_WidgetFlag, iTrue); |
729 | } | 729 | } |
730 | setId_Widget(d->resizer, side == left_SideBarSide ? "sidebar.grab" : "sidebar2.grab"); | 730 | setId_Widget(d->resizer, side == left_SidebarSide ? "sidebar.grab" : "sidebar2.grab"); |
731 | setBackgroundColor_Widget(d->resizer, none_ColorId); | 731 | setBackgroundColor_Widget(d->resizer, none_ColorId); |
732 | d->menu = NULL; | 732 | d->menu = NULL; |
733 | addAction_Widget(w, SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh"); | 733 | addAction_Widget(w, SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh"); |
734 | updateMetrics_SidebarWidget_(d); | 734 | updateMetrics_SidebarWidget_(d); |
735 | if (side == left_SideBarSide) { | 735 | if (side == left_SidebarSide) { |
736 | postCommand_App("~sidebar.update"); /* unread count */ | 736 | postCommand_App("~sidebar.update"); /* unread count */ |
737 | } | 737 | } |
738 | } | 738 | } |
@@ -799,7 +799,7 @@ static void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si | |||
799 | updateContextMenu_SidebarWidget_(d); | 799 | updateContextMenu_SidebarWidget_(d); |
800 | arrange_Widget(d->menu); | 800 | arrange_Widget(d->menu); |
801 | openMenu_Widget(d->menu, | 801 | openMenu_Widget(d->menu, |
802 | d->side == left_SideBarSide | 802 | d->side == left_SidebarSide |
803 | ? topRight_Rect(itemRect_ListWidget(d->list, itemIndex)) | 803 | ? topRight_Rect(itemRect_ListWidget(d->list, itemIndex)) |
804 | : addX_I2(topLeft_Rect(itemRect_ListWidget(d->list, itemIndex)), | 804 | : addX_I2(topLeft_Rect(itemRect_ListWidget(d->list, itemIndex)), |
805 | -width_Widget(d->menu))); | 805 | -width_Widget(d->menu))); |
@@ -857,7 +857,7 @@ void setWidth_SidebarWidget(iSidebarWidget *d, float widthAsGaps) { | |||
857 | if (!isFixedWidth) { | 857 | if (!isFixedWidth) { |
858 | /* Even less space if the other sidebar is visible, too. */ | 858 | /* Even less space if the other sidebar is visible, too. */ |
859 | const int otherWidth = | 859 | const int otherWidth = |
860 | width_Widget(findWidget_App(d->side == left_SideBarSide ? "sidebar2" : "sidebar")); | 860 | width_Widget(findWidget_App(d->side == left_SidebarSide ? "sidebar2" : "sidebar")); |
861 | width = iClamp(width, 30 * gap_UI, size_Root(w->root).x - 50 * gap_UI - otherWidth); | 861 | width = iClamp(width, 30 * gap_UI, size_Root(w->root).x - 50 * gap_UI - otherWidth); |
862 | } | 862 | } |
863 | d->widthAsGaps = (float) width / (float) gap_UI; | 863 | d->widthAsGaps = (float) width / (float) gap_UI; |
@@ -938,7 +938,7 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * | |||
938 | } | 938 | } |
939 | const iBool isAnimated = prefs_App()->uiAnimations && | 939 | const iBool isAnimated = prefs_App()->uiAnimations && |
940 | argLabel_Command(cmd, "noanim") == 0 && | 940 | argLabel_Command(cmd, "noanim") == 0 && |
941 | (d->side == left_SideBarSide || deviceType_App() != phone_AppDeviceType); | 941 | (d->side == left_SidebarSide || deviceType_App() != phone_AppDeviceType); |
942 | int visX = 0; | 942 | int visX = 0; |
943 | if (isVisible_Widget(w)) { | 943 | if (isVisible_Widget(w)) { |
944 | visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect); | 944 | visX = left_Rect(bounds_Widget(w)) - left_Rect(w->root->widget->rect); |
@@ -950,13 +950,13 @@ static iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char * | |||
950 | invalidate_ListWidget(d->list); | 950 | invalidate_ListWidget(d->list); |
951 | if (isAnimated) { | 951 | if (isAnimated) { |
952 | setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); | 952 | setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); |
953 | setVisualOffset_Widget(w, (d->side == left_SideBarSide ? -1 : 1) * w->rect.size.x, 0, 0); | 953 | setVisualOffset_Widget(w, (d->side == left_SidebarSide ? -1 : 1) * w->rect.size.x, 0, 0); |
954 | setVisualOffset_Widget(w, 0, 300, easeOut_AnimFlag | softer_AnimFlag); | 954 | setVisualOffset_Widget(w, 0, 300, easeOut_AnimFlag | softer_AnimFlag); |
955 | } | 955 | } |
956 | } | 956 | } |
957 | else if (isAnimated) { | 957 | else if (isAnimated) { |
958 | setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); | 958 | setFlags_Widget(w, horizontalOffset_WidgetFlag, iTrue); |
959 | if (d->side == right_SideBarSide) { | 959 | if (d->side == right_SidebarSide) { |
960 | setVisualOffset_Widget(w, visX, 0, 0); | 960 | setVisualOffset_Widget(w, visX, 0, 0); |
961 | setVisualOffset_Widget(w, visX + w->rect.size.x, 300, easeOut_AnimFlag | softer_AnimFlag); | 961 | setVisualOffset_Widget(w, visX + w->rect.size.x, 300, easeOut_AnimFlag | softer_AnimFlag); |
962 | } | 962 | } |
@@ -984,7 +984,8 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
984 | /* Handle commands. */ | 984 | /* Handle commands. */ |
985 | if (isResize_UserEvent(ev)) { | 985 | if (isResize_UserEvent(ev)) { |
986 | checkModeButtonLayout_SidebarWidget_(d); | 986 | checkModeButtonLayout_SidebarWidget_(d); |
987 | if (deviceType_App() == phone_AppDeviceType && d->side == left_SideBarSide) { | 987 | if (deviceType_App() == phone_AppDeviceType && d->side == left_SidebarSide) { |
988 | setFlags_Widget(w, rightEdgeDraggable_WidgetFlag, isPortrait_App()); | ||
988 | /* In landscape, visibility of the toolbar is controlled separately. */ | 989 | /* In landscape, visibility of the toolbar is controlled separately. */ |
989 | if (isVisible_Widget(w)) { | 990 | if (isVisible_Widget(w)) { |
990 | postCommand_Widget(w, "sidebar.toggle"); | 991 | postCommand_Widget(w, "sidebar.toggle"); |
@@ -1038,6 +1039,11 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1038 | postCommandf_App("sidebar.mode arg:%d toggle:1", identities_SidebarMode); | 1039 | postCommandf_App("sidebar.mode arg:%d toggle:1", identities_SidebarMode); |
1039 | return iTrue; | 1040 | return iTrue; |
1040 | } | 1041 | } |
1042 | else if (isPortraitPhone_App() && isVisible_Widget(w) && d->side == left_SidebarSide && | ||
1043 | equal_Command(cmd, "swipe.forward")) { | ||
1044 | postCommand_App("sidebar.toggle"); | ||
1045 | return iTrue; | ||
1046 | } | ||
1041 | else if (startsWith_CStr(cmd, cstr_String(&d->cmdPrefix))) { | 1047 | else if (startsWith_CStr(cmd, cstr_String(&d->cmdPrefix))) { |
1042 | if (handleSidebarCommand_SidebarWidget_(d, cmd + size_String(&d->cmdPrefix))) { | 1048 | if (handleSidebarCommand_SidebarWidget_(d, cmd + size_String(&d->cmdPrefix))) { |
1043 | return iTrue; | 1049 | return iTrue; |
@@ -1068,7 +1074,7 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev) | |||
1068 | const int resMid = d->resizer->rect.size.x / 2; | 1074 | const int resMid = d->resizer->rect.size.x / 2; |
1069 | setWidth_SidebarWidget( | 1075 | setWidth_SidebarWidget( |
1070 | d, | 1076 | d, |
1071 | ((d->side == left_SideBarSide | 1077 | ((d->side == left_SidebarSide |
1072 | ? inner.x | 1078 | ? inner.x |
1073 | : (right_Rect(rect_Root(w->root)) - coord_Command(cmd).x)) + | 1079 | : (right_Rect(rect_Root(w->root)) - coord_Command(cmd).x)) + |
1074 | resMid) / (float) gap_UI); | 1080 | resMid) / (float) gap_UI); |
@@ -1547,7 +1553,7 @@ static void draw_SidebarWidget_(const iSidebarWidget *d) { | |||
1547 | if (isVisible_Widget(w)) { | 1553 | if (isVisible_Widget(w)) { |
1548 | drawVLine_Paint( | 1554 | drawVLine_Paint( |
1549 | &p, | 1555 | &p, |
1550 | addX_I2(d->side == left_SideBarSide ? topRight_Rect(bounds) : topLeft_Rect(bounds), -1), | 1556 | addX_I2(d->side == left_SidebarSide ? topRight_Rect(bounds) : topLeft_Rect(bounds), -1), |
1551 | height_Rect(bounds), | 1557 | height_Rect(bounds), |
1552 | uiSeparator_ColorId); | 1558 | uiSeparator_ColorId); |
1553 | } | 1559 | } |
diff --git a/src/ui/sidebarwidget.h b/src/ui/sidebarwidget.h index 2e418aa4..130242ab 100644 --- a/src/ui/sidebarwidget.h +++ b/src/ui/sidebarwidget.h | |||
@@ -36,8 +36,8 @@ enum iSidebarMode { | |||
36 | const char * icon_SidebarMode (enum iSidebarMode mode); | 36 | const char * icon_SidebarMode (enum iSidebarMode mode); |
37 | 37 | ||
38 | enum iSidebarSide { | 38 | enum iSidebarSide { |
39 | left_SideBarSide, | 39 | left_SidebarSide, |
40 | right_SideBarSide, | 40 | right_SidebarSide, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | enum iFeedsMode { | 43 | enum iFeedsMode { |
diff --git a/src/ui/touch.c b/src/ui/touch.c index c7c5a410..236601e8 100644 --- a/src/ui/touch.c +++ b/src/ui/touch.c | |||
@@ -274,8 +274,9 @@ static void update_TouchState_(void *ptr) { | |||
274 | // setHover_Widget(NULL); | 274 | // setHover_Widget(NULL); |
275 | postCommandf_App("edgeswipe.ended abort:1 side:%d id:%llu", touch->edge, touch->id); | 275 | postCommandf_App("edgeswipe.ended abort:1 side:%d id:%llu", touch->edge, touch->id); |
276 | touch->edge = none_TouchEdge; | 276 | touch->edge = none_TouchEdge; |
277 | remove_ArrayIterator(&i); | ||
277 | } | 278 | } |
278 | else continue; | 279 | continue; |
279 | } | 280 | } |
280 | /* Holding a touch will reset previous momentum for this widget. */ | 281 | /* Holding a touch will reset previous momentum for this widget. */ |
281 | if (isStationary_Touch_(touch)) { | 282 | if (isStationary_Touch_(touch)) { |
@@ -362,6 +363,7 @@ static void update_TouchState_(void *ptr) { | |||
362 | } | 363 | } |
363 | } | 364 | } |
364 | 365 | ||
366 | #if 0 | ||
365 | static iWidget *findSlidePanel_Widget_(iWidget *d) { | 367 | static iWidget *findSlidePanel_Widget_(iWidget *d) { |
366 | for (iWidget *w = d; w; w = parent_Widget(w)) { | 368 | for (iWidget *w = d; w; w = parent_Widget(w)) { |
367 | if (isVisible_Widget(w) && flags_Widget(w) & edgeDraggable_WidgetFlag) { | 369 | if (isVisible_Widget(w) && flags_Widget(w) & edgeDraggable_WidgetFlag) { |
@@ -370,6 +372,7 @@ static iWidget *findSlidePanel_Widget_(iWidget *d) { | |||
370 | } | 372 | } |
371 | return NULL; | 373 | return NULL; |
372 | } | 374 | } |
375 | #endif | ||
373 | 376 | ||
374 | static void checkNewPinch_TouchState_(iTouchState *d, iTouch *newTouch) { | 377 | static void checkNewPinch_TouchState_(iTouchState *d, iTouch *newTouch) { |
375 | iWidget *affinity = newTouch->affinity; | 378 | iWidget *affinity = newTouch->affinity; |
diff --git a/src/ui/util.c b/src/ui/util.c index 9cc848de..f2449096 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1317,7 +1317,7 @@ void updateValueInput_Widget(iWidget *d, const char *title, const char *prompt) | |||
1317 | 1317 | ||
1318 | static iBool messageHandler_(iWidget *msg, const char *cmd) { | 1318 | static iBool messageHandler_(iWidget *msg, const char *cmd) { |
1319 | /* Almost any command dismisses the sheet. */ | 1319 | /* Almost any command dismisses the sheet. */ |
1320 | /* TODO: Use a "notification" prefix (like `) to ignore all types of commands line this? */ | 1320 | /* TODO: Add a "notification" type of user events to separate them from user actions. */ |
1321 | if (!(equal_Command(cmd, "media.updated") || | 1321 | if (!(equal_Command(cmd, "media.updated") || |
1322 | equal_Command(cmd, "media.player.update") || | 1322 | equal_Command(cmd, "media.player.update") || |
1323 | equal_Command(cmd, "bookmarks.request.finished") || | 1323 | equal_Command(cmd, "bookmarks.request.finished") || |
diff --git a/src/ui/widget.c b/src/ui/widget.c index bedcb146..f1d1dae4 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -1058,15 +1058,19 @@ iBool processEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
1058 | } | 1058 | } |
1059 | if (ev->user.code == command_UserEventCode) { | 1059 | if (ev->user.code == command_UserEventCode) { |
1060 | const char *cmd = command_UserEvent(ev); | 1060 | const char *cmd = command_UserEvent(ev); |
1061 | if (d->flags & edgeDraggable_WidgetFlag && | 1061 | if (d->flags & (leftEdgeDraggable_WidgetFlag | rightEdgeDraggable_WidgetFlag) && |
1062 | isVisible_Widget(d) && | 1062 | isVisible_Widget(d) && ~d->flags & disabled_WidgetFlag && |
1063 | ~d->flags & disabled_WidgetFlag && | ||
1064 | equal_Command(cmd, "edgeswipe.moved")) { | 1063 | equal_Command(cmd, "edgeswipe.moved")) { |
1065 | if (~d->flags & dragged_WidgetFlag) { | 1064 | /* Check the side. */ |
1066 | setFlags_Widget(d, dragged_WidgetFlag, iTrue); | 1065 | const int side = argLabel_Command(cmd, "side"); |
1066 | if ((side == 1 && d->flags & leftEdgeDraggable_WidgetFlag) || | ||
1067 | (side == 2 && d->flags & rightEdgeDraggable_WidgetFlag)) { | ||
1068 | if (~d->flags & dragged_WidgetFlag) { | ||
1069 | setFlags_Widget(d, dragged_WidgetFlag, iTrue); | ||
1070 | } | ||
1071 | setVisualOffset_Widget(d, arg_Command(command_UserEvent(ev)), 10, 0); | ||
1072 | return iTrue; | ||
1067 | } | 1073 | } |
1068 | setVisualOffset_Widget(d, arg_Command(command_UserEvent(ev)), 10, 0); | ||
1069 | return iTrue; | ||
1070 | } | 1074 | } |
1071 | if (d->flags & dragged_WidgetFlag && equal_Command(cmd, "edgeswipe.ended")) { | 1075 | if (d->flags & dragged_WidgetFlag && equal_Command(cmd, "edgeswipe.ended")) { |
1072 | if (argLabel_Command(cmd, "abort")) { | 1076 | if (argLabel_Command(cmd, "abort")) { |
diff --git a/src/ui/widget.h b/src/ui/widget.h index 8de62b7a..7255b975 100644 --- a/src/ui/widget.h +++ b/src/ui/widget.h | |||
@@ -87,7 +87,7 @@ enum iWidgetFlag { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | /* 64-bit extended flags */ | 89 | /* 64-bit extended flags */ |
90 | //#define wasCollapsed_WidgetFlag iBit64(32) | 90 | #define rightEdgeDraggable_WidgetFlag iBit64(32) |
91 | #define disabledWhenHidden_WidgetFlag iBit64(32) | 91 | #define disabledWhenHidden_WidgetFlag iBit64(32) |
92 | #define centerHorizontal_WidgetFlag iBit64(33) | 92 | #define centerHorizontal_WidgetFlag iBit64(33) |
93 | #define moveToParentLeftEdge_WidgetFlag iBit64(34) | 93 | #define moveToParentLeftEdge_WidgetFlag iBit64(34) |
@@ -118,7 +118,7 @@ enum iWidgetFlag { | |||
118 | #define ignoreForParentWidth_WidgetFlag iBit64(59) | 118 | #define ignoreForParentWidth_WidgetFlag iBit64(59) |
119 | #define noFadeBackground_WidgetFlag iBit64(60) | 119 | #define noFadeBackground_WidgetFlag iBit64(60) |
120 | #define destroyPending_WidgetFlag iBit64(61) /* TODO: needed? */ | 120 | #define destroyPending_WidgetFlag iBit64(61) /* TODO: needed? */ |
121 | #define edgeDraggable_WidgetFlag iBit64(62) | 121 | #define leftEdgeDraggable_WidgetFlag iBit64(62) |
122 | #define refChildrenOffset_WidgetFlag iBit64(63) /* visual offset determined by the offset of referenced children */ | 122 | #define refChildrenOffset_WidgetFlag iBit64(63) /* visual offset determined by the offset of referenced children */ |
123 | 123 | ||
124 | enum iWidgetAddPos { | 124 | enum iWidgetAddPos { |