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

15
src/imports/mvvmdatasyncquick/DataSyncView.qml

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

14
src/imports/mvvmdatasyncquick/NetworkExchangeView.qml

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

9
src/imports/mvvmquick/ListSection.qml

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

12
src/imports/mvvmquick/SettingsView.qml

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

Loading…
Cancel
Save