fix layout
This commit is contained in:
parent
72485975cb
commit
bd82f72a40
@ -97,7 +97,7 @@ Rectangle {
|
||||
Layout.fillHeight: true
|
||||
Layout.preferredHeight: parent.height - buttonsRow.height
|
||||
|
||||
QtControls.ScrollView{
|
||||
QtControls.ScrollView {
|
||||
id: categoriesScroll
|
||||
frameVisible: true
|
||||
anchors {
|
||||
@ -151,7 +151,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
QtControls.ScrollView{
|
||||
QtControls.ScrollView {
|
||||
id: pageScroll
|
||||
anchors {
|
||||
top: parent.top
|
||||
@ -166,7 +166,11 @@ Rectangle {
|
||||
height: childrenRect.height
|
||||
QtControls.StackView {
|
||||
id: main
|
||||
anchors.fill: parent
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
height: Math.max(pageScroll.height, currentItem.implicitHeight)
|
||||
anchors.margins: 12
|
||||
property string sourceFile
|
||||
Timer {
|
||||
@ -204,7 +208,7 @@ Rectangle {
|
||||
rightMargin: spacing
|
||||
}
|
||||
QtControls.Button {
|
||||
iconSource: "dialog-ok"
|
||||
iconName: "dialog-ok"
|
||||
text: "Ok"
|
||||
onClicked: {
|
||||
if (main.currentItem.saveConfig !== undefined) {
|
||||
@ -216,7 +220,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
iconSource: "dialog-ok-apply"
|
||||
iconName: "dialog-ok-apply"
|
||||
text: "Apply"
|
||||
onClicked: {
|
||||
if (main.currentItem.saveConfig !== undefined) {
|
||||
@ -227,7 +231,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
iconSource: "dialog-cancel"
|
||||
iconName: "dialog-cancel"
|
||||
text: "Cancel"
|
||||
onClicked: configDialog.close()
|
||||
}
|
||||
|
@ -17,12 +17,12 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||
import org.kde.plasma.configuration 2.0
|
||||
import QtQuick.Controls 1.0 as QtControls
|
||||
import QtQuick.Layouts 1.0
|
||||
|
||||
Column {
|
||||
ColumnLayout {
|
||||
id: root
|
||||
|
||||
spacing: _m
|
||||
@ -30,7 +30,6 @@ Column {
|
||||
text: "Plugins"
|
||||
}
|
||||
|
||||
|
||||
//BEGIN functions
|
||||
function saveConfig() {
|
||||
for (var key in configDialog.wallpaperConfiguration) {
|
||||
@ -109,25 +108,32 @@ Column {
|
||||
}
|
||||
}
|
||||
}
|
||||
PlasmaComponents.PageStack {
|
||||
|
||||
Row {
|
||||
spacing: 10
|
||||
QtControls.Label {
|
||||
anchors.verticalCenter: pluginCombobox.verticalCenter
|
||||
text: "Wallpaper plugin:"
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
id: pluginCombobox
|
||||
model: configDialog.wallpaperConfigModel
|
||||
textRole: "name"
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.StackView {
|
||||
id: main
|
||||
Layout.fillHeight: true;
|
||||
anchors {
|
||||
left: categoriesView.left;
|
||||
right: parent.right;
|
||||
}
|
||||
width: implicitWidth
|
||||
height: implicitHeight
|
||||
property string sourceFile
|
||||
onSourceFileChanged: {
|
||||
if (sourceFile != "") {
|
||||
main.opacity = 1;
|
||||
replace(Qt.resolvedUrl(sourceFile))
|
||||
//main.width = mainColumn.implicitWidth
|
||||
main.height = mainColumn.implicitHeight
|
||||
} else {
|
||||
main.opacity = 0
|
||||
}
|
||||
}
|
||||
Behavior on opacity { NumberAnimation {} }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user