diff --git a/modules/BarGroup.qml b/modules/BarGroup.qml index d790a66..9a344e5 100644 --- a/modules/BarGroup.qml +++ b/modules/BarGroup.qml @@ -31,10 +31,29 @@ Item { implicitHeight: M.Theme.barHeight - 3 - _pad readonly property int _pad: 6 - property bool _hovered: false - HoverHandler { - onHoveredChanged: root._hovered = hovered + // Shadow source — rendered offscreen, only its glow is visible + Rectangle { + id: shadowSource + anchors.fill: parent + color: "transparent" + border.color: root.borderColor + border.width: 1 + topLeftRadius: root._tlr + topRightRadius: root._trr + bottomLeftRadius: root._blr + bottomRightRadius: root._brr + visible: false + } + + MultiEffect { + source: shadowSource + anchors.fill: shadowSource + shadowEnabled: true + shadowColor: root.borderColor + shadowBlur: 1.0 + shadowVerticalOffset: 0 + shadowHorizontalOffset: 0 } // Frosted base — semi-transparent so the bar background bleeds through @@ -85,7 +104,7 @@ Item { } } - // Visible border — glow on hover only + // Visible border Rectangle { anchors.fill: parent color: "transparent" @@ -95,15 +114,6 @@ Item { topRightRadius: root._trr bottomLeftRadius: root._blr bottomRightRadius: root._brr - - layer.enabled: root._hovered - layer.effect: MultiEffect { - shadowEnabled: true - shadowColor: root.borderColor - shadowBlur: 1.0 - shadowVerticalOffset: 0 - shadowHorizontalOffset: 0 - } } Row { diff --git a/stats-daemon/src/main.rs b/stats-daemon/src/main.rs index 838d32f..b206397 100644 --- a/stats-daemon/src/main.rs +++ b/stats-daemon/src/main.rs @@ -201,21 +201,18 @@ fn main() { let stdout = io::stdout(); let mut out = io::BufWriter::new(stdout.lock()); let mut prev: Vec = vec![]; - let mut freqs: Vec = vec![]; let mut tick = 0u64; loop { let t0 = Instant::now(); let curr = read_stat(); - if tick.is_multiple_of(2) { - freqs = read_core_freqs(); - emit_mem(&mut out); - } + let freqs = read_core_freqs(); emit_cpu(&mut out, &prev, &curr, &freqs); prev = curr; - if tick.is_multiple_of(4) { + if tick.is_multiple_of(2) { + emit_mem(&mut out); emit_temp(&mut out); }