Commit d62fd2dd authored by Nate Graham's avatar Nate Graham 🔩

[applets/batterymonitor] Port inhibition message to Layouts and match notifications applet

Summary:
This makes it take up less vertical space in the header area and also match the similar
message in the notifications applet.

Test Plan: {F8274308}

Reviewers: #vdg, #plasma, broulik, manueljlin, mart

Reviewed By: #vdg, #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Maniphest Tasks: T10470

Differential Revision: https://phabricator.kde.org/D29315
parent 71f1ff8e
......@@ -30,8 +30,8 @@ RowLayout {
PlasmaCore.IconItem {
id: iconItem
Layout.preferredWidth: units.iconSizes.medium
Layout.preferredHeight: units.iconSizes.medium
Layout.preferredWidth: units.iconSizes.small
Layout.preferredHeight: units.iconSizes.small
visible: valid
}
......
......@@ -24,13 +24,13 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as Components
import org.kde.kquickcontrolsaddons 2.0
Column {
ColumnLayout {
property alias enabled: pmCheckBox.checked
spacing: 0
RowLayout {
width: parent.width
Layout.fillWidth: true
Components.CheckBox {
id: pmCheckBox
......@@ -57,23 +57,20 @@ Column {
}
}
Column {
anchors {
left: parent.left
leftMargin: units.iconSizes.medium + units.gridUnit
right: parent.right
}
ColumnLayout {
Layout.fillWidth: true
Layout.leftMargin: units.gridUnit + units.smallSpacing // width of checkbox and spacer
spacing: units.smallSpacing
InhibitionHint {
width: parent.width
Layout.fillWidth: true
visible: pmSource.data["PowerDevil"] && pmSource.data["PowerDevil"]["Is Lid Present"] && !pmSource.data["PowerDevil"]["Triggers Lid Action"] ? true : false
iconSource: "computer-laptop"
text: i18n("Your notebook is configured not to suspend when closing the lid while an external monitor is connected.")
}
InhibitionHint {
width: parent.width
Layout.fillWidth: true
visible: inhibitions.length > 0
iconSource: inhibitions.length > 0 ? inhibitions[0].Icon || "" : ""
text: {
......
Markdown is supported
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