-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathMMListView.qml
More file actions
40 lines (33 loc) · 1.3 KB
/
MMListView.qml
File metadata and controls
40 lines (33 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
import QtQuick
import QtQuick.Controls
import QtQml
//
// Hot-fix for hotfix https://github.com/MerginMaps/mobile/issues/3417
// Seems like there is some issue with cache in ListView
//
ListView {
id: root
cacheBuffer: 0
readonly property bool isMobile: (Qt.platform.os === "android" || Qt.platform.os === "ios")
property int scrollSpace: !isMobile ? 10 : 0
property bool showScrollBar: true
ScrollBar.vertical: ScrollBar {
id: verticalScrollBar
policy: isMobile ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
visible: showScrollBar
opacity: active ? 0.7 : 0.4
contentItem: Rectangle {
implicitWidth: 5
radius: width / 2
color: __style.darkGreenColor
}
}
}