mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-08-03 23:11:28 +02:00
Make scroll views scrollable with touch
This commit is contained in:
@@ -49,6 +49,8 @@ component GoodsList {
|
||||
in property <[SItem]> items;
|
||||
|
||||
ListView {
|
||||
mouse-drag-pan-enabled: true;
|
||||
|
||||
for item in items: VerticalLayout {
|
||||
GoodListItem {
|
||||
item: item;
|
||||
@@ -71,6 +73,7 @@ component GoodButtons inherits ScrollView {
|
||||
property <int> count-y: ceil(favorites.length / count-x);
|
||||
|
||||
viewport-height: (count-y * (button-height + button-spacing)) * 1pt;
|
||||
mouse-drag-pan-enabled: true;
|
||||
|
||||
for item[idx] in favorites: Button {
|
||||
x: floor(mod(idx, count-x)) * (root.button-width + root.button-spacing) * 1pt;
|
||||
|
||||
Reference in New Issue
Block a user