Compare commits
No commits in common. "d85b65c6d9fb1e6289f5914d015dc0f381c1a3b3" and "adb6c21135c93e0c57517ba90a32dd8f6bf2704d" have entirely different histories.
d85b65c6d9
...
adb6c21135
4 changed files with 44 additions and 89 deletions
|
|
@ -138,51 +138,6 @@ Column {
|
|||
}
|
||||
}
|
||||
|
||||
// Overall CPU utilization chart
|
||||
Item {
|
||||
width: root.width
|
||||
height: 44
|
||||
|
||||
Text {
|
||||
id: _totalLabel
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: S.SystemStats.cpuUsage + "%"
|
||||
color: S.Theme.loadColor(S.SystemStats.cpuUsage)
|
||||
font.pixelSize: S.Theme.fontSize - 1
|
||||
font.family: S.Theme.fontFamily
|
||||
font.bold: true
|
||||
width: 32
|
||||
}
|
||||
|
||||
SparklineCanvas {
|
||||
anchors.left: _totalLabel.right
|
||||
anchors.leftMargin: 6
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 32
|
||||
history: root._cpuHistory
|
||||
strokeColor: root.accentColor
|
||||
colorAt: v => S.Theme.loadColor(v)
|
||||
active: root.active
|
||||
}
|
||||
}
|
||||
|
||||
property var _cpuHistory: []
|
||||
onActiveChanged: if (active)
|
||||
_cpuHistory = []
|
||||
Connections {
|
||||
target: S.SystemStats
|
||||
function onCpuUsageChanged() {
|
||||
if (!root.active)
|
||||
return;
|
||||
const h = root._cpuHistory.concat([S.SystemStats.cpuUsage]);
|
||||
root._cpuHistory = h.length > 60 ? h.slice(h.length - 60) : h;
|
||||
}
|
||||
}
|
||||
|
||||
Separator {}
|
||||
|
||||
Item {
|
||||
|
|
|
|||
|
|
@ -70,6 +70,19 @@ Column {
|
|||
}
|
||||
}
|
||||
|
||||
// Memory history sparkline
|
||||
SparklineCanvas {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
height: 32
|
||||
history: S.SystemStats.memHistory
|
||||
strokeColor: root.accentColor
|
||||
colorAt: v => S.Theme.loadColor(v)
|
||||
active: root.active
|
||||
}
|
||||
|
||||
// Breakdown rows
|
||||
InfoRow {
|
||||
label: "Used"
|
||||
|
|
@ -88,19 +101,6 @@ Column {
|
|||
value: root._fmt(root.totalGb)
|
||||
}
|
||||
|
||||
// Memory history sparkline
|
||||
SparklineCanvas {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 12
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 12
|
||||
height: 32
|
||||
history: S.SystemStats.memHistory
|
||||
strokeColor: root.accentColor
|
||||
colorAt: v => S.Theme.loadColor(v)
|
||||
active: root.active
|
||||
}
|
||||
|
||||
Separator {}
|
||||
|
||||
Item {
|
||||
|
|
|
|||
|
|
@ -13,36 +13,6 @@ WlSessionLockSurface {
|
|||
|
||||
color: S.Theme.base00
|
||||
|
||||
// Keyboard input via TextInput - engages Qt's full input pipeline including
|
||||
// text-input protocol, which is more reliable than Keys on a plain Item in
|
||||
// layer-shell/lock surfaces where raw wl_keyboard delivery can be flaky.
|
||||
// Declared BEFORE visual content so it's below in z-order - widget TapHandlers
|
||||
// receive mouse events, while keyboard activeFocus is independent of stacking.
|
||||
TextInput {
|
||||
id: _keyInput
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
color: "transparent"
|
||||
selectionColor: "transparent"
|
||||
selectedTextColor: "transparent"
|
||||
cursorVisible: false
|
||||
enabled: !root._unlocking && root.auth.state !== "max" && root.auth.state !== "busy"
|
||||
|
||||
onTextChanged: if (root.auth)
|
||||
root.auth.buffer = text
|
||||
|
||||
Keys.onReturnPressed: root.auth.submit()
|
||||
Keys.onEnterPressed: root.auth.submit()
|
||||
Keys.onEscapePressed: {
|
||||
text = "";
|
||||
}
|
||||
|
||||
onActiveFocusChanged: {
|
||||
if (!activeFocus)
|
||||
forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
property real _unlockFade: 1
|
||||
|
||||
// Threat level: eased curve so fails 1-2 are subtle, 3+ ramps up.
|
||||
|
|
@ -224,6 +194,36 @@ WlSessionLockSurface {
|
|||
}
|
||||
}
|
||||
|
||||
// Keyboard input via TextInput - engages Qt's full input pipeline including
|
||||
// text-input protocol, which is more reliable than Keys on a plain Item in
|
||||
// layer-shell/lock surfaces where raw wl_keyboard delivery can be flaky.
|
||||
// Declared before content so it's below in z-order - content TapHandlers
|
||||
// receive mouse events, while keyboard activeFocus is independent of stacking.
|
||||
TextInput {
|
||||
id: _keyInput
|
||||
anchors.fill: parent
|
||||
focus: true
|
||||
color: "transparent"
|
||||
selectionColor: "transparent"
|
||||
selectedTextColor: "transparent"
|
||||
cursorVisible: false
|
||||
enabled: !root._unlocking && root.auth.state !== "max" && root.auth.state !== "busy"
|
||||
|
||||
onTextChanged: if (root.auth)
|
||||
root.auth.buffer = text
|
||||
|
||||
Keys.onReturnPressed: root.auth.submit()
|
||||
Keys.onEnterPressed: root.auth.submit()
|
||||
Keys.onEscapePressed: {
|
||||
text = "";
|
||||
}
|
||||
|
||||
onActiveFocusChanged: {
|
||||
if (!activeFocus)
|
||||
forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible)
|
||||
_keyInput.forceActiveFocus();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ M.BarModule {
|
|||
id: root
|
||||
active: S.Modules.clock.enable
|
||||
spacing: S.Theme.moduleSpacing
|
||||
tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy HH:mm:ss")
|
||||
tooltip: Qt.formatDateTime(clock.date, "dddd, dd. MMMM yyyy")
|
||||
panelNamespace: "nova-clock"
|
||||
panelContentWidth: 220
|
||||
panelComponent: Component {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue