Commit 077f756b authored by Marco Martin's avatar Marco Martin
Browse files

fullscreen applet configs

the layout of wallpapers configs survives better
parent f873e375
......@@ -36,11 +36,11 @@ Rectangle {
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
color: Qt.rgba(0, 0, 0, 0.6 * dialog.position)
color: "transparent"
//BEGIN properties
property bool isContainment: false
property alias internalDialog: dialog
property alias internalDialog: dialogContents
//END properties
//BEGIN model
......@@ -119,31 +119,24 @@ Rectangle {
// root.width = dialogRootItem.implicitWidth
// root.height = dialogRootItem.implicitHeight
}
onVisibleChanged: {
if (visible) {
dialogContents.visible = true;
}
}
//END connections
//BEGIN UI components
QtControls.Drawer {
id: dialog
Rectangle {
id: dialogContents
visible: true
edge: Qt.BottomEdge
onClosed: configDialog.close()
x: parent.width/2 - width/2
opacity: position
width: Math.min(Math.max(units.gridUnit * 35, dialogRootItem.implicitWidth + leftPadding + rightPadding), root.width)
height: Math.min(root.height - units.gridUnit * 2, dialogRootItem.implicitHeight + topPadding + bottomPadding + units.gridUnit, root.height)
leftPadding: background.margins.left
topPadding: background.margins.top
rightPadding: background.margins.right
bottomPadding: 0
background: PlasmaCore.FrameSvgItem {
imagePath: "widgets/background"
enabledBorders: PlasmaCore.FrameSvgItem.LeftBorder | PlasmaCore.FrameSvgItem.TopBorder | PlasmaCore.FrameSvgItem.RightBorder
}
contentItem: ColumnLayout {
anchors.fill: parent
color: Kirigami.Theme.backgroundColor
ColumnLayout {
id: dialogRootItem
anchors.fill: parent
spacing: 0
implicitWidth: scroll.implicitWidth
......
......@@ -56,6 +56,8 @@ AppletConfiguration {
id: imageWallpaperDrawer
edge: root.horizontal ? Qt.LeftEdge : Qt.BottomEdge
visible: true
dragMargin: 0
onClosed: {
if (!root.internalDialog.visible) {
configDialog.close()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment