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
2827 property alias leftContent: leftContentGroup .children
2928 property alias rightContent: rightContentGroup .children
3029
4443 implicitWidth: ListView? .view ? .width ?? 0 // in case ListView is injected as attached property (usually it is)
4544 implicitHeight: contentLayout .implicitHeight
4645 height: visible ? implicitHeight : 0.1 // hide invisible items, for some reason setting 0 does not work ¯\_(ツ)_/¯
47- width: implicitWidth - ListView .view .scrollSpace
46+ width: implicitWidth - ( ListView? .view ? .scrollSpace ?? 0 )
4847
4948 MouseArea {
5049 anchors .fill : contentLayout
Original file line number Diff line number Diff line change 99
1010import QtQuick
1111import QtQuick.Controls
12+ import QtQml
1213
1314//
1415// Hot-fix for hotfix https://github.com/MerginMaps/mobile/issues/3417
@@ -29,10 +30,6 @@ ListView {
2930 visible: ! isMobile && (root .contentHeight > root .height )
3031 opacity: (pressed || root .moving ) ? 0.7 : 0.4
3132
32- anchors .right : root .right
33-
34- implicitHeight: root .height
35-
3633 contentItem: Rectangle {
3734 implicitWidth: 5
3835 radius: width / 2
Original file line number Diff line number Diff line change 99
1010import QtQuick
1111import QtQuick.Controls
12+ import QtQml
1213
1314// Convenient class to use as a pageContent or drawerContent
1415// base element to make the content scroll
@@ -19,26 +20,22 @@ ScrollView {
1920 readonly property bool isMobile: (Qt .platform .os === " android" || Qt .platform .os === " ios" )
2021 property int scrollSpace: ! isMobile ? 10 : 0
2122
22- contentWidth: availableWidth - scrollSpace // to only scroll vertically
23-
24- ScrollBar .horizontal : null
23+ contentWidth: availableWidth - scrollSpace
2524
25+ ScrollBar .horizontal .policy : ScrollBar .AlwaysOff
2626 ScrollBar .vertical : ScrollBar {
2727 id: verticalScrollBar
2828
29- policy: ScrollBar .AsNeeded
29+ policy: ScrollBar .AlwaysOn
3030 visible: ! isMobile && (root .contentHeight > root .height )
3131 opacity: (pressed || root .moving ) ? 0.7 : 0.4
32-
33- anchors .right : root .right
34-
3532 implicitHeight: root .height
33+ anchors .right : parent .right
3634
3735 contentItem: Rectangle {
3836 implicitWidth: 5
3937 radius: width / 2
4038 color: __style .darkGreenColor
4139 }
4240 }
43-
4441}
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ Item {
198198 model: root .controller .fieldModel
199199
200200 delegate: Item {
201- width: ListView .view .width - ListView .view .width
201+ width: ListView .view .width - ListView .view .scrollSpace
202202 height: childrenRect .height
203203
204204 Column {
Original file line number Diff line number Diff line change 1010import QtQuick
1111import QtQuick.Controls
1212import QtQuick.Layouts
13- import QtQml
1413
1514import mm 1.0 as MM
1615
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ MMComponents.MMPage {
7070 delegate: MMProjectComponents .MMProjectWizardDelegate {
7171 id: fieldDelegate
7272
73- width: ListView .view .width - ListView .view .width
73+ width: ListView .view .width - ListView .view .scrollSpace
7474
7575 // find current index in the model
7676 comboboxField .comboboxModel : typesmodel
Original file line number Diff line number Diff line change @@ -53,7 +53,15 @@ MMPage {
5353 width: parent .width
5454 }
5555
56- ScrollBar .vertical : ScrollBar { }
56+ ScrollBar .vertical : ScrollBar {
57+ opacity: (root .pressed || root .moving ) ? 0.7 : 0.4
58+
59+ contentItem: Rectangle {
60+ implicitWidth: 5
61+ radius: width / 2
62+ color: __style .darkGreenColor
63+ }
64+ }
5765 }
5866
5967 MMButton {
You can’t perform that action at this time.
0 commit comments