mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-24 07:09:51 +00:00
Panels: improvements
- slightly smaller and more homogenous sizing - better look for battery panel (icons)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user