mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Add animations everywhere
This commit is contained in:
+7
-7
@@ -15,8 +15,6 @@ Variants {
|
||||
required property ShellScreen modelData
|
||||
readonly property real scaling: Scaling.scale(screen)
|
||||
|
||||
property var settingsPanel: null
|
||||
|
||||
screen: modelData
|
||||
implicitHeight: Style.barHeight * scaling
|
||||
color: "transparent"
|
||||
@@ -52,11 +50,13 @@ Variants {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Style.marginSmall * scaling
|
||||
|
||||
NText {
|
||||
text: screen.name
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
// Debug show monitor name
|
||||
// NText {
|
||||
// text: screen.name
|
||||
// anchors.verticalCenter: parent.verticalCenter
|
||||
// font.weight: Style.fontWeightBold
|
||||
// }
|
||||
SystemMonitor {}
|
||||
}
|
||||
|
||||
// Center
|
||||
|
||||
@@ -36,4 +36,4 @@ NIconButton {
|
||||
NotificationHistoryPanel {
|
||||
id: notificationHistoryPanelLoader
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,4 +228,4 @@ NLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
Row {
|
||||
id: layout
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: Style.marginSmall * scaling
|
||||
visible: Settings.data.bar.showSystemInfo
|
||||
|
||||
// Ensure our width is an integer
|
||||
width: Math.floor(cpuUsageLayout.width + cpuTempLayout.width + memoryUsageLayout.width + (2 * 10))
|
||||
|
||||
Row {
|
||||
id: cpuUsageLayout
|
||||
spacing: Style.marginTiny * scaling
|
||||
|
||||
NText {
|
||||
id: cpuUsageIcon
|
||||
text: "speed"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: Colors.accentPrimary
|
||||
}
|
||||
|
||||
NText {
|
||||
id: cpuUsageText
|
||||
text: `${SystemStats.cpuUsage}%`
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
// CPU Temperature Component
|
||||
Row {
|
||||
id: cpuTempLayout
|
||||
spacing: Style.marginTiny * scaling
|
||||
|
||||
NText {
|
||||
text: "thermometer"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
color: Colors.accentPrimary
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
NText {
|
||||
text: `${SystemStats.cpuTemp}°C`
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
// Memory Usage Component
|
||||
Row {
|
||||
id: memoryUsageLayout
|
||||
spacing: Style.marginTiny * scaling
|
||||
|
||||
NText {
|
||||
text: "memory"
|
||||
font.family: "Material Symbols Outlined"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
color: Colors.accentPrimary
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
NText {
|
||||
text: `${SystemStats.memoryUsageGb}G`
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.weight: Style.fontWeightBold
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-12
@@ -10,9 +10,6 @@ Item {
|
||||
width: pill.width
|
||||
height: pill.height
|
||||
|
||||
// Reference to settings panel
|
||||
property var settingsPanel: null
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("[Volume] settingsPanel received:", !!settingsPanel)
|
||||
}
|
||||
@@ -87,15 +84,8 @@ Item {
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
// Open settings panel and navigate to Audio tab
|
||||
console.log("[Volume] Attempting to open settings panel...")
|
||||
try {
|
||||
settingsPanel.isLoaded = true
|
||||
settingsPanel.content.currentTabIndex = 5 // Audio tab index
|
||||
console.log("[Volume] Settings panel opened successfully")
|
||||
} catch (error) {
|
||||
console.log("[Volume] Error opening settings panel:", error)
|
||||
}
|
||||
settingsPanel.currentTabIndex = 5 // Audio tab index
|
||||
settingsPanel.isLoaded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user