Tons of small changes, add SidePanel, NCard, NCircleStat, NSystemMnitor
This commit is contained in:
parent
b0ff67e2e4
commit
92e121b356
12 changed files with 579 additions and 5 deletions
68
Modules/SidePanel/ProfileCard.qml
Normal file
68
Modules/SidePanel/ProfileCard.qml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import QtQuick.Effects
|
||||
import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
// Header card with avatar, user and quick actions
|
||||
NBox {
|
||||
id: root
|
||||
|
||||
readonly property real scaling: Scaling.scale(screen)
|
||||
|
||||
Layout.fillWidth: true
|
||||
// Height driven by content
|
||||
implicitHeight: content.implicitHeight + Style.marginMedium * 2 * scaling
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
anchors.margins: Style.marginMedium * scaling
|
||||
spacing: Style.marginMedium * scaling
|
||||
|
||||
Item {
|
||||
id: avatarBox
|
||||
width: 40 * scaling
|
||||
height: 40 * scaling
|
||||
|
||||
Image {
|
||||
id: avatarImage
|
||||
anchors.fill: parent
|
||||
source: Settings.data.general.avatarImage
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
}
|
||||
|
||||
// Ensure rounded corners consistently across renderers
|
||||
MultiEffect {
|
||||
anchors.fill: avatarImage
|
||||
source: avatarImage
|
||||
maskEnabled: true
|
||||
maskSource: Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "white"
|
||||
radius: Style.radiusMedium * scaling
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 2 * scaling
|
||||
NText { text: Quickshell.env("USER") || "user" }
|
||||
NText { text: "System Uptime: —"; color: Colors.textSecondary }
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginSmall * scaling
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Item { Layout.fillWidth: true }
|
||||
NIconButton { icon: "settings"; sizeMultiplier: 0.8 }
|
||||
NIconButton { icon: "power_settings_new"; sizeMultiplier: 0.8 }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue