Panels: improvements

- slightly smaller and more homogenous sizing
- better look for battery panel (icons)
This commit is contained in:
ItsLemmy
2025-11-06 23:14:48 -05:00
parent df73582ae8
commit fc3db67def
9 changed files with 52 additions and 25 deletions
+28 -8
View File
@@ -59,19 +59,33 @@ SmartPanel {
Component {
id: disabledComponent
NText {
text: I18n.tr("battery.panel.disabled")
pointSize: Style.fontSizeL
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
ColumnLayout {
anchors.centerIn: parent
spacing: Style.marginM
NIcon {
icon: "recharging"
pointSize: 48
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
NText {
text: I18n.tr("battery.panel.disabled")
pointSize: Style.fontSizeL
color: Color.mOnSurfaceVariant
wrapMode: Text.WordWrap
Layout.alignment: Qt.AlignHCenter
}
}
}
panelContent: Item {
anchors.fill: parent
property real contentPreferredHeight: mainLayout.implicitHeight + Style.marginM * 2
property real contentPreferredWidth: 350 * Style.uiScaleRatio
property real contentPreferredWidth: Math.round(340 * Style.uiScaleRatio)
property real contentPreferredHeight: Math.round(mainLayout.implicitHeight + Style.marginM * 2)
ColumnLayout {
id: mainLayout
@@ -91,6 +105,12 @@ SmartPanel {
anchors.margins: Style.marginM
spacing: Style.marginM
NIcon {
icon: "battery-4"
pointSize: Style.fontSizeXXL
color: Color.mPrimary
}
NText {
text: I18n.tr("battery.panel.title")
pointSize: Style.fontSizeL