diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-04 07:40:56 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-12-04 07:40:56 +0200 |
commit | 723fcbf263bd2f5ff6c259a47091ebf685b50723 (patch) | |
tree | 5ed11977ee09fa542ed62a12c73117a27140d04e /src/ui/listwidget.h | |
parent | ad86fbe2cffa2bea07d004782e711932c5c91a79 (diff) |
Mobile: Sidebar is now a vertically sliding panel
Switched the phone sidebar to use the iOS half/full-height sliding sheet design. This is better for finger reachability and for retaining access to the current page.
Diffstat (limited to 'src/ui/listwidget.h')
-rw-r--r-- | src/ui/listwidget.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/listwidget.h b/src/ui/listwidget.h index 7e6624a0..081109e8 100644 --- a/src/ui/listwidget.h +++ b/src/ui/listwidget.h | |||
@@ -51,6 +51,12 @@ iDeclareObjectConstruction(ListWidget) | |||
51 | 51 | ||
52 | iDeclareType(VisBuf) | 52 | iDeclareType(VisBuf) |
53 | 53 | ||
54 | enum iScrollMode { | ||
55 | normal_ScrollMode, | ||
56 | disabledAtTopBothDirections_ScrollMode, | ||
57 | disabledAtTopUpwards_ScrollMode, | ||
58 | }; | ||
59 | |||
54 | struct Impl_ListWidget { | 60 | struct Impl_ListWidget { |
55 | iWidget widget; | 61 | iWidget widget; |
56 | iScrollWidget *scroll; | 62 | iScrollWidget *scroll; |
@@ -63,6 +69,7 @@ struct Impl_ListWidget { | |||
63 | iClick click; | 69 | iClick click; |
64 | iIntSet invalidItems; | 70 | iIntSet invalidItems; |
65 | iVisBuf *visBuf; | 71 | iVisBuf *visBuf; |
72 | enum iScrollMode scrollMode; | ||
66 | iBool noHoverWhileScrolling; | 73 | iBool noHoverWhileScrolling; |
67 | }; | 74 | }; |
68 | 75 | ||
@@ -82,6 +89,7 @@ int itemHeight_ListWidget (const iListWidget *); | |||
82 | int scrollPos_ListWidget (const iListWidget *); | 89 | int scrollPos_ListWidget (const iListWidget *); |
83 | 90 | ||
84 | void setScrollPos_ListWidget (iListWidget *, int pos); | 91 | void setScrollPos_ListWidget (iListWidget *, int pos); |
92 | void setScrollMode_ListWidget (iListWidget *, enum iScrollMode mode); | ||
85 | void scrollToItem_ListWidget (iListWidget *, size_t index, uint32_t span); | 93 | void scrollToItem_ListWidget (iListWidget *, size_t index, uint32_t span); |
86 | void scrollOffset_ListWidget (iListWidget *, int offset); | 94 | void scrollOffset_ListWidget (iListWidget *, int offset); |
87 | void scrollOffsetSpan_ListWidget (iListWidget *, int offset, uint32_t span); | 95 | void scrollOffsetSpan_ListWidget (iListWidget *, int offset, uint32_t span); |