Compare commits
2 Commits
d395a155af
...
5b58c27e80
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b58c27e80 | |||
| 82be653c04 |
@@ -4,22 +4,12 @@ import Quickshell
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import "../../config"
|
import "../../config"
|
||||||
|
|
||||||
// Package update indicator — replaces the old waybar custom/updater module
|
|
||||||
// (see .config/waybar/config and its scripts/update-distro.sh). The actual
|
|
||||||
// polling/state lives in the SystemUpdates singleton (config/), shared
|
|
||||||
// across every monitor's bar; this is just the icon + panel UI. Clicking
|
|
||||||
// opens a panel showing the pending count with a button that runs the
|
|
||||||
// actual update in a terminal (scripts/update-system.sh, ported from the
|
|
||||||
// same waybar script, distro-detection and all).
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
implicitWidth: row.implicitWidth + 2
|
implicitWidth: row.implicitWidth + 6
|
||||||
implicitHeight: Appearance.barHeight
|
implicitHeight: Appearance.barHeight
|
||||||
|
|
||||||
// The bar's own PanelWindow — same barWindow-anchoring convention as
|
|
||||||
// every other popup-having module here (Volume.qml, PowerButton.qml,
|
|
||||||
// etc.), so the panel opens in a fixed spot rather than following this
|
|
||||||
// icon's exact position in its RowLayout.
|
|
||||||
required property var barWindow
|
required property var barWindow
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
@@ -29,13 +19,6 @@ Item {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: label
|
id: label
|
||||||
// Nerd Font glyph (package-variant) normally, matching the old
|
|
||||||
// waybar custom/updater module's icon — not a Material Symbols
|
|
||||||
// ligature name like the rest of this bar, so it needs the Nerd
|
|
||||||
// Font instead of iconFontFamilyRounded. While a check is running
|
|
||||||
// (the periodic poll or a right-click-triggered refresh) this
|
|
||||||
// swaps to the same spinner glyph/animation as
|
|
||||||
// BluetoothIndicator.qml's scan spinner.
|
|
||||||
font.family: SystemUpdates.checking ? Appearance.iconFontFamilyRounded : Appearance.fontFamily
|
font.family: SystemUpdates.checking ? Appearance.iconFontFamilyRounded : Appearance.fontFamily
|
||||||
font.variableAxes: Appearance.iconFontAxes
|
font.variableAxes: Appearance.iconFontAxes
|
||||||
font.pixelSize: SystemUpdates.checking ? 15 : 22
|
font.pixelSize: SystemUpdates.checking ? 15 : 22
|
||||||
@@ -48,9 +31,6 @@ Item {
|
|||||||
from: 0
|
from: 0
|
||||||
to: 360
|
to: 360
|
||||||
duration: 900
|
duration: 900
|
||||||
// Otherwise the icon is left tilted at whatever angle the
|
|
||||||
// spin stopped on once checking finishes and it swaps back
|
|
||||||
// to the static glyph.
|
|
||||||
onRunningChanged: if (!running) label.rotation = 0
|
onRunningChanged: if (!running) label.rotation = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,9 +61,6 @@ Item {
|
|||||||
id: panel
|
id: panel
|
||||||
visible: false
|
visible: false
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
// Same contentWidth/contentPadding split as the other panels
|
|
||||||
// (Volume.qml, PowerButton.qml, etc.) rather than a single magic
|
|
||||||
// implicitWidth.
|
|
||||||
readonly property int contentWidth: 200
|
readonly property int contentWidth: 200
|
||||||
readonly property int contentPadding: 16
|
readonly property int contentPadding: 16
|
||||||
implicitWidth: contentWidth + contentPadding * 2
|
implicitWidth: contentWidth + contentPadding * 2
|
||||||
@@ -91,11 +68,6 @@ Item {
|
|||||||
|
|
||||||
anchor {
|
anchor {
|
||||||
window: root.barWindow
|
window: root.barWindow
|
||||||
// Unlike anchor.item, anchor.window doesn't default rect to the
|
|
||||||
// window's own bounds — set it explicitly so edges/gravity below
|
|
||||||
// resolve against the full bar. Bottom alone (no Left/Right)
|
|
||||||
// anchors to the bar's bottom-center, which lines up with this
|
|
||||||
// icon since it sits in the bar's centered RowLayout.
|
|
||||||
rect.x: 0
|
rect.x: 0
|
||||||
rect.y: 0
|
rect.y: 0
|
||||||
rect.width: root.barWindow.width
|
rect.width: root.barWindow.width
|
||||||
@@ -159,10 +131,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same selectable-row shape as this project's other panel
|
|
||||||
// actions (e.g. PowerButton.qml's menu entries): radius 0,
|
|
||||||
// fixed-width icon column, fillWidth label, offset hover
|
|
||||||
// halo rather than one drawn on the row's own edge.
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: updateBtn
|
id: updateBtn
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|||||||
Reference in New Issue
Block a user