diff --git a/src/imports/mvvmdatasyncquick/ChangeRemoteView.qml b/src/imports/mvvmdatasyncquick/ChangeRemoteView.qml index 11cc5a5..aa0731e 100644 --- a/src/imports/mvvmdatasyncquick/ChangeRemoteView.qml +++ b/src/imports/mvvmdatasyncquick/ChangeRemoteView.qml @@ -143,67 +143,69 @@ 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 - text: qsTr("%1: %2").arg(key).arg(value) + delegate: ItemDelegate { + width: _headerScrollView.width + text: qsTr("%1: %2").arg(key).arg(value) - Button { - id: _rmButton - flat: true - icon.width: 24 - icon.height: 24 - icon.name: "user-trash" - icon.source: "qrc:/de/skycoder42/qtmvvm/quick/icons/ic_delete_forever.svg" - anchors.right: parent.right - implicitHeight: parent.height - implicitWidth: implicitHeight + Button { + id: _rmButton + flat: true + icon.width: 24 + icon.height: 24 + icon.name: "user-trash" + icon.source: "qrc:/de/skycoder42/qtmvvm/quick/icons/ic_delete_forever.svg" + anchors.right: parent.right + implicitHeight: parent.height + implicitWidth: implicitHeight - onClicked: viewModel.removeHeaderConfig(index) + onClicked: viewModel.removeHeaderConfig(index) + } } - } - footer: RowLayout { - width: parent.width + footer: RowLayout { + width: _headerScrollView.width - TextField { - id: _keyEdit - placeholderText: qsTr("Key") - Layout.fillWidth: true - } + TextField { + id: _keyEdit + placeholderText: qsTr("Key") + Layout.fillWidth: true + } - TextField { - id: _valueEdit - placeholderText: qsTr("Value") - Layout.fillWidth: true - } + TextField { + id: _valueEdit + placeholderText: qsTr("Value") + Layout.fillWidth: true + } - Button { - id: _addButton - flat: true - enabled: _keyEdit.text !== "" - icon.width: 24 - icon.height: 24 - icon.name: "list-add" - icon.source: "qrc:/de/skycoder42/qtmvvm/quick/icons/ic_add.svg" - - onClicked: { - viewModel.addHeaderConfig(_keyEdit.text, _valueEdit.text); - _keyEdit.clear(); - _valueEdit.clear(); + Button { + id: _addButton + flat: true + enabled: _keyEdit.text !== "" + icon.width: 24 + icon.height: 24 + icon.name: "list-add" + icon.source: "qrc:/de/skycoder42/qtmvvm/quick/icons/ic_add.svg" + + onClicked: { + viewModel.addHeaderConfig(_keyEdit.text, _valueEdit.text); + _keyEdit.clear(); + _valueEdit.clear(); + } } } } diff --git a/src/imports/mvvmdatasyncquick/DataSyncView.qml b/src/imports/mvvmdatasyncquick/DataSyncView.qml index b2fd64c..d4b7147 100644 --- a/src/imports/mvvmdatasyncquick/DataSyncView.qml +++ b/src/imports/mvvmdatasyncquick/DataSyncView.qml @@ -161,87 +161,90 @@ 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 - delegate: SwipeDelegate { - id: _swipeDelegate - width: parent.width + model: viewModel.sortedModel + delegate: SwipeDelegate { + id: _swipeDelegate + width: _devicesScrollView.width - contentItem: ColumnLayout { - id: _delegateLayout - spacing: 8 + contentItem: ColumnLayout { + id: _delegateLayout + spacing: 8 - Label { - id: _nameLabel - Layout.fillWidth: true - text: name - } + Label { + id: _nameLabel + Layout.fillWidth: true + text: name + } - Label { - id: _fpLabel - font.pointSize: _nameLabel.font.pointSize * 0.8 - Layout.fillWidth: true - Layout.leftMargin: 8 - text: fingerPrint - elide: Text.ElideMiddle - opacity: 0.75 + Label { + id: _fpLabel + font.pointSize: _nameLabel.font.pointSize * 0.8 + Layout.fillWidth: true + Layout.leftMargin: 8 + text: fingerPrint + elide: Text.ElideMiddle + opacity: 0.75 + } } - } - ListView.onRemove: SequentialAnimation { - PropertyAction { - target: _swipeDelegate - property: "ListView.delayRemove" - value: true - } - NumberAnimation { - target: _swipeDelegate - property: "height" - to: 0 - easing.type: Easing.InOutQuad - } - PropertyAction { - target: _swipeDelegate - property: "ListView.delayRemove" - value: false + ListView.onRemove: SequentialAnimation { + PropertyAction { + target: _swipeDelegate + property: "ListView.delayRemove" + value: true + } + NumberAnimation { + target: _swipeDelegate + property: "height" + to: 0 + easing.type: Easing.InOutQuad + } + PropertyAction { + target: _swipeDelegate + property: "ListView.delayRemove" + value: false + } } - } - swipe.right: Rectangle { - height: parent.height - width: height - anchors.right: parent.right - color: { - if(QuickPresenter.currentStyle === "Material") - return Material.color(Material.Red); - else if(QuickPresenter.currentStyle === "Universal") - return Universal.color(Universal.Red); - else - return "#FF0000"; - } + swipe.right: Rectangle { + height: _devicesScrollView.height + width: height + anchors.right: parent.right + color: { + if(QuickPresenter.currentStyle === "Material") + return Material.color(Material.Red); + else if(QuickPresenter.currentStyle === "Universal") + return Universal.color(Universal.Red); + else + return "#FF0000"; + } - ActionButton { - anchors.centerIn: parent - implicitHeight: parent.height - implicitWidth: parent.width + ActionButton { + anchors.centerIn: parent + implicitHeight: parent.height + implicitWidth: parent.width - icon.name: "user-trash" - icon.source: "qrc:/de/skycoder42/qtmvvm/quick/icons/ic_delete_forever.svg" - text: qsTr("Remove Device") + icon.name: "user-trash" + icon.source: "qrc:/de/skycoder42/qtmvvm/quick/icons/ic_delete_forever.svg" + text: qsTr("Remove Device") - Material.foreground: "white" - Universal.foreground: "white" + Material.foreground: "white" + Universal.foreground: "white" - onClicked: { - _swipeDelegate.swipe.close(); - viewModel.removeDevice(index) + onClicked: { + _swipeDelegate.swipe.close(); + viewModel.removeDevice(index) + } } } } diff --git a/src/imports/mvvmdatasyncquick/NetworkExchangeView.qml b/src/imports/mvvmdatasyncquick/NetworkExchangeView.qml index c3ace04..bbb5873 100644 --- a/src/imports/mvvmdatasyncquick/NetworkExchangeView.qml +++ b/src/imports/mvvmdatasyncquick/NetworkExchangeView.qml @@ -114,40 +114,42 @@ Page { } } - ListView { - id: _exchangeList + ScrollView { + id: _exchangeScrollView + Layout.fillWidth: true Layout.fillHeight: true clip: true - model: viewModel.sortedModel - - ScrollBar.vertical: ScrollBar {} - - delegate: ItemDelegate { - width: parent.width - - contentItem: ColumnLayout { - id: _delegateLayout - spacing: 8 - - Label { - id: _nameLabel - Layout.fillWidth: true - text: name + ListView { + id: _exchangeList + + model: viewModel.sortedModel + delegate: ItemDelegate { + width: _exchangeScrollView.width + + contentItem: ColumnLayout { + id: _delegateLayout + spacing: 8 + + Label { + id: _nameLabel + Layout.fillWidth: true + text: name + } + + Label { + id: _addressLabel + font.pointSize: _nameLabel.font.pointSize * 0.8 + Layout.fillWidth: true + Layout.leftMargin: 8 + text: address + opacity: 0.75 + } } - Label { - id: _addressLabel - font.pointSize: _nameLabel.font.pointSize * 0.8 - Layout.fillWidth: true - Layout.leftMargin: 8 - text: address - opacity: 0.75 - } + onClicked: viewModel.exportTo(index) } - - onClicked: viewModel.exportTo(index) } } } diff --git a/src/imports/mvvmquick/ListSection.qml b/src/imports/mvvmquick/ListSection.qml index 5a2d87e..7b7ec8a 100644 --- a/src/imports/mvvmquick/ListSection.qml +++ b/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 diff --git a/src/imports/mvvmquick/SettingsView.qml b/src/imports/mvvmquick/SettingsView.qml index 0f0297a..61d72cb 100644 --- a/src/imports/mvvmquick/SettingsView.qml +++ b/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) } }