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
+2 -2
View File
@@ -17,8 +17,8 @@ SmartPanel {
property real localInputVolume: AudioService.inputVolume || 0
property bool localInputVolumeChanging: false
preferredWidth: 380 * Style.uiScaleRatio
preferredHeight: 420 * Style.uiScaleRatio
preferredWidth: Math.round(340 * Style.uiScaleRatio)
preferredHeight: Math.round(420 * Style.uiScaleRatio)
// Connections to update local volumes when AudioService changes
Connections {
+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
+5 -2
View File
@@ -12,13 +12,16 @@ import qs.Modules.MainScreen
SmartPanel {
id: root
preferredWidth: 420 * Style.uiScaleRatio
preferredWidth: Math.round(340 * Style.uiScaleRatio)
preferredHeight: 500 * Style.uiScaleRatio
panelContent: Rectangle {
color: Color.transparent
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(240, mainColumn.implicitHeight + Style.marginL * 2))
ColumnLayout {
id: mainColumn
anchors.fill: parent
anchors.margins: Style.marginL
spacing: Style.marginM
@@ -92,7 +95,7 @@ SmartPanel {
NIcon {
icon: "bluetooth-off"
pointSize: 64
pointSize: 48
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
+3 -3
View File
@@ -14,8 +14,8 @@ SmartPanel {
readonly property var now: Time.now
preferredWidth: 500 * Style.uiScaleRatio
preferredHeight: 700 * Style.uiScaleRatio
preferredWidth: Math.round(440 * Style.uiScaleRatio)
preferredHeight: Math.round(700 * Style.uiScaleRatio)
// Helper function to calculate ISO week number
function getISOWeekNumber(date) {
@@ -641,7 +641,7 @@ SmartPanel {
sourceComponent: WeatherCard {
Layout.fillWidth: true
forecastDays: 6
forecastDays: 5
showLocation: false
}
}
@@ -9,7 +9,7 @@ import qs.Widgets
NBox {
id: root
property int forecastDays: 7
property int forecastDays: 6
property bool showLocation: true
readonly property bool weatherReady: Settings.data.location.weatherEnabled && (LocationService.data.weather !== null)
@@ -14,7 +14,7 @@ SmartPanel {
panelAnchorHorizontalCenter: true
panelAnchorVerticalCenter: true
preferredWidth: Math.round(460 * Style.uiScaleRatio)
preferredWidth: Math.round(440 * Style.uiScaleRatio)
preferredHeight: {
var height = 0
var count = 0
@@ -13,8 +13,8 @@ import qs.Modules.MainScreen
SmartPanel {
id: root
preferredWidth: 380 * Style.uiScaleRatio
preferredHeight: 480 * Style.uiScaleRatio
preferredWidth: Math.round(340 * Style.uiScaleRatio)
preferredHeight: Math.round(420 * Style.uiScaleRatio)
onOpened: function () {
NotificationService.updateLastSeenTs()
@@ -25,6 +25,7 @@ SmartPanel {
color: Color.transparent
ColumnLayout {
id: mainColumn
anchors.fill: parent
anchors.margins: Style.marginL
spacing: Style.marginM
@@ -95,7 +96,7 @@ SmartPanel {
NIcon {
icon: "bell-off"
pointSize: 64
pointSize: 48
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}
+2 -2
View File
@@ -14,8 +14,8 @@ import qs.Modules.MainScreen
SmartPanel {
id: root
preferredWidth: 400 * Style.uiScaleRatio
preferredHeight: 340 * Style.uiScaleRatio
preferredWidth: Math.round(400 * Style.uiScaleRatio)
preferredHeight: Math.round(340 * Style.uiScaleRatio)
panelAnchorHorizontalCenter: true
panelAnchorVerticalCenter: true
+6 -3
View File
@@ -11,8 +11,8 @@ import qs.Modules.MainScreen
SmartPanel {
id: root
preferredWidth: 420 * Style.uiScaleRatio
preferredHeight: 500 * Style.uiScaleRatio
preferredWidth: Math.round(340 * Style.uiScaleRatio)
preferredHeight: Math.round(500 * Style.uiScaleRatio)
property string passwordSsid: ""
property string passwordInput: ""
@@ -23,7 +23,10 @@ SmartPanel {
panelContent: Rectangle {
color: Color.transparent
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(240, mainColumn.implicitHeight + Style.marginL * 2))
ColumnLayout {
id: mainColumn
anchors.fill: parent
anchors.margins: Style.marginL
spacing: Style.marginM
@@ -131,7 +134,7 @@ SmartPanel {
NIcon {
icon: "wifi-off"
pointSize: 64
pointSize: 48
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
}