Commit bd848ce4 authored by Nate Graham's avatar Nate Graham
Browse files

applets/weather: Make desktop widget big enough to fit Configure button

If we don't set Layout.minimum{width,height} properties on the
FullRepresentation, it will default to something tiny and the
Configure… button shown on first launch will overflow.

Set it to a sane size, and also take into account the final layout once
content later gets added so it isn't too small once configured.

BUG: 419591
FIXED-IN: 5.24.7
parent ce03e476
Pipeline #217284 passed with stage
in 1 minute and 34 seconds
......@@ -22,6 +22,9 @@ ColumnLayout {
property alias generalModel: topPanel.generalModel
property alias observationModel: topPanel.observationModel
Layout.minimumWidth: Math.max(PlasmaCore.Units.gridUnit * 10, topPanel.implicitWidth, switchPanel.implicitWidth)
Layout.minimumHeight: Math.max(PlasmaCore.Units.gridUnit * 10, topPanel.implicitHeight + switchPanel.implicitHeight + sourceLabel.implicitHeight + (spacing * 2))
PlasmaExtras.PlaceholderMessage {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
Layout.margins: PlasmaCore.Units.largeSpacing
......@@ -46,6 +49,7 @@ ColumnLayout {
}
SwitchPanel {
id: switchPanel
visible: !root.needsConfiguration
Layout.fillWidth: true
......@@ -56,6 +60,7 @@ ColumnLayout {
}
PlasmaComponents.Label {
id: sourceLabel
visible: !root.needsConfiguration
readonly property string creditUrl: generalModel.creditUrl
......
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