File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 property string text
2525 property string secondaryText
2626
27+ readonly property int scrollSpace: (ListView .view && ListView .view .scrollSpace ) ? ListView .view .scrollSpace : 0
2728 property alias leftContent: leftContentGroup .children
2829 property alias rightContent: rightContentGroup .children
2930
@@ -40,9 +41,10 @@ Item {
4041
4142 property real verticalSpacing: root .secondaryText ? __style .margin8 : __style .margin20
4243
43- implicitWidth: ListView? .view ? .width ?? 0 // in case ListView is injected as attached property (usually it is)
44+ implicitWidth: ListView? .view ? .width ?? 0 // in case ListView is injected as attached property (usually it is)
4445 implicitHeight: contentLayout .implicitHeight
4546 height: visible ? implicitHeight : 0.1 // hide invisible items, for some reason setting 0 does not work ¯\_(ツ)_/¯
47+ width: implicitWidth - root .scrollSpace
4648
4749 MouseArea {
4850 anchors .fill : contentLayout
Original file line number Diff line number Diff line change 88 ***************************************************************************/
99
1010import QtQuick
11+ import QtQuick.Controls
1112
1213//
1314// Hot-fix for hotfix https://github.com/MerginMaps/mobile/issues/3417
1415// Seems like there is some issue with cache in ListView
1516//
1617
1718ListView {
19+ id: root
1820
1921 cacheBuffer: 0
22+ readonly property bool isMobile: (Qt .platform .os === " android" || Qt .platform .os === " ios" )
23+ property int scrollSpace: ! isMobile ? 10 : 0
24+
25+ ScrollBar .vertical : ScrollBar {
26+ id: verticalScrollBar
27+
28+ policy: ScrollBar .AlwaysOn
29+ visible: ! isMobile && (root .contentHeight > root .height )
30+ opacity: (pressed || root .moving ) ? 0.7 : 0.4
31+
32+ anchors .right : root .right
33+
34+ implicitHeight: root .height
35+
36+ contentItem: Rectangle {
37+ implicitWidth: 5
38+ radius: width / 2
39+ color: __style .darkGreenColor
40+ }
41+ }
2042}
Original file line number Diff line number Diff line change @@ -20,4 +20,5 @@ ScrollView {
2020
2121 ScrollBar .vertical .policy : ScrollBar .AlwaysOff
2222 ScrollBar .horizontal .policy : ScrollBar .AlwaysOff
23+
2324}
Original file line number Diff line number Diff line change @@ -73,23 +73,6 @@ MMComponents.MMPage {
7373 onClicked: root .featureClicked ( model .FeaturePair )
7474 }
7575
76- ScrollBar .vertical : ScrollBar {
77- id: verticalScrollBar
78-
79- readonly property bool isMobile: (Qt .platform .os === " android" || Qt .platform .os === " ios" )
80- policy: ScrollBar .AlwaysOn
81- visible: ! isMobile
82- opacity: (pressed || listView .moving ) ? 0.7 : 0.4
83-
84- implicitHeight: listView .height
85-
86- contentItem: Rectangle {
87- implicitWidth: 5
88- radius: width / 2
89- color: __style .darkGreenColor
90- }
91- }
92-
9376 footer: MMComponents .MMListSpacer {
9477 height: __style .margin20 + ( root .hasToolbar ? 0 : __style .safeAreaBottom ) + ( addButton .visible ? addButton .height : 0 )
9578 }
You can’t perform that action at this time.
0 commit comments