Browse Source

use scrollview everywhere

partially untested for datasync
pull/2/head
Skycoder42 7 years ago
parent
commit
bb00d47b21
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 18
      src/imports/mvvmdatasyncquick/ChangeRemoteView.qml
  2. 15
      src/imports/mvvmdatasyncquick/DataSyncView.qml
  3. 14
      src/imports/mvvmdatasyncquick/NetworkExchangeView.qml
  4. 9
      src/imports/mvvmquick/ListSection.qml
  5. 12
      src/imports/mvvmquick/SettingsView.qml

18
src/imports/mvvmdatasyncquick/ChangeRemoteView.qml

@ -143,22 +143,23 @@ Page {
Label { Label {
text: qsTr("Extra Headers:") text: qsTr("Extra Headers:")
Layout.fillWidth: true Layout.fillWidth: true
color: _headerList.focus ? _accessKeyEdit.selectionColor : palette.text color: _headerScrollView.focus ? _accessKeyEdit.selectionColor : palette.text
opacity: _headerList.focus ? 1 : 0.5 opacity: _headerScrollView.focus ? 1 : 0.5
} }
ListView { ScrollView {
id: _headerList id: _headerScrollView
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
clip: true clip: true
model: viewModel.headerModel ListView {
id: _headerList
ScrollBar.vertical: ScrollBar {} model: viewModel.headerModel
delegate: ItemDelegate { delegate: ItemDelegate {
width: parent.width width: _headerScrollView.width
text: qsTr("%1: %2").arg(key).arg(value) text: qsTr("%1: %2").arg(key).arg(value)
Button { Button {
@ -177,7 +178,7 @@ Page {
} }
footer: RowLayout { footer: RowLayout {
width: parent.width width: _headerScrollView.width
TextField { TextField {
id: _keyEdit id: _keyEdit
@ -211,3 +212,4 @@ Page {
} }
} }
} }
}

15
src/imports/mvvmdatasyncquick/DataSyncView.qml

@ -161,18 +161,20 @@ Page {
text: qsTr("Other Devices:") text: qsTr("Other Devices:")
} }
ListView { ScrollView {
id: _devicesList id: _devicesScrollView
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
clip: true clip: true
model: viewModel.sortedModel
ScrollBar.vertical: ScrollBar {} ListView {
id: _devicesList
model: viewModel.sortedModel
delegate: SwipeDelegate { delegate: SwipeDelegate {
id: _swipeDelegate id: _swipeDelegate
width: parent.width width: _devicesScrollView.width
contentItem: ColumnLayout { contentItem: ColumnLayout {
id: _delegateLayout id: _delegateLayout
@ -215,7 +217,7 @@ Page {
} }
swipe.right: Rectangle { swipe.right: Rectangle {
height: parent.height height: _devicesScrollView.height
width: height width: height
anchors.right: parent.right anchors.right: parent.right
color: { color: {
@ -249,6 +251,7 @@ Page {
} }
} }
} }
}
RoundActionButton { RoundActionButton {
id: _addButton id: _addButton

14
src/imports/mvvmdatasyncquick/NetworkExchangeView.qml

@ -114,18 +114,19 @@ Page {
} }
} }
ListView { ScrollView {
id: _exchangeList id: _exchangeScrollView
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
clip: true clip: true
model: viewModel.sortedModel ListView {
id: _exchangeList
ScrollBar.vertical: ScrollBar {}
model: viewModel.sortedModel
delegate: ItemDelegate { delegate: ItemDelegate {
width: parent.width width: _exchangeScrollView.width
contentItem: ColumnLayout { contentItem: ColumnLayout {
id: _delegateLayout id: _delegateLayout
@ -153,3 +154,4 @@ Page {
} }
} }
} }
}

9
src/imports/mvvmquick/ListSection.qml

@ -16,14 +16,7 @@ Label {
background: Rectangle { background: Rectangle {
anchors.fill: parent anchors.fill: parent
color: { color: "transparent"
if(QuickPresenter.currentStyle === "Material")
return Material.background;
else if(QuickPresenter.currentStyle === "Universal")
return Universal.background;
else
return "white";
}
Rectangle { Rectangle {
anchors.left: parent.left anchors.left: parent.left

12
src/imports/mvvmquick/SettingsView.qml

@ -231,17 +231,17 @@ Page {
id: _overviewComponent id: _overviewComponent
ScrollView { ScrollView {
id: __ovScrollView
property alias model: __ovListView.model property alias model: __ovListView.model
property alias showSections: __ovListView.showSections property alias showSections: __ovListView.showSections
anchors.fill: parent
clip: true clip: true
OverviewListView { OverviewListView {
id: __ovListView id: __ovListView
builder: _builder builder: _builder
Component.onCompleted: _settingsStack.push(__ovListView)
} }
Component.onCompleted: _settingsStack.push(__ovScrollView)
} }
} }
@ -249,16 +249,16 @@ Page {
id: _sectionViewComponent id: _sectionViewComponent
ScrollView { ScrollView {
id: __secScrollView
property alias model: __secListView.model property alias model: __secListView.model
anchors.fill: parent
clip: true clip: true
SectionListView { SectionListView {
id: __secListView id: __secListView
builder: _builder builder: _builder
Component.onCompleted: _settingsStack.push(__secListView)
} }
Component.onCompleted: _settingsStack.push(__secScrollView)
} }
} }

Loading…
Cancel
Save