summaryrefslogtreecommitdiff
path: root/src/ui/listwidget.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-12-04 07:40:56 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-12-04 07:40:56 +0200
commit723fcbf263bd2f5ff6c259a47091ebf685b50723 (patch)
tree5ed11977ee09fa542ed62a12c73117a27140d04e /src/ui/listwidget.h
parentad86fbe2cffa2bea07d004782e711932c5c91a79 (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.h8
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
52iDeclareType(VisBuf) 52iDeclareType(VisBuf)
53 53
54enum iScrollMode {
55 normal_ScrollMode,
56 disabledAtTopBothDirections_ScrollMode,
57 disabledAtTopUpwards_ScrollMode,
58};
59
54struct Impl_ListWidget { 60struct 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 *);
82int scrollPos_ListWidget (const iListWidget *); 89int scrollPos_ListWidget (const iListWidget *);
83 90
84void setScrollPos_ListWidget (iListWidget *, int pos); 91void setScrollPos_ListWidget (iListWidget *, int pos);
92void setScrollMode_ListWidget (iListWidget *, enum iScrollMode mode);
85void scrollToItem_ListWidget (iListWidget *, size_t index, uint32_t span); 93void scrollToItem_ListWidget (iListWidget *, size_t index, uint32_t span);
86void scrollOffset_ListWidget (iListWidget *, int offset); 94void scrollOffset_ListWidget (iListWidget *, int offset);
87void scrollOffsetSpan_ListWidget (iListWidget *, int offset, uint32_t span); 95void scrollOffsetSpan_ListWidget (iListWidget *, int offset, uint32_t span);