fix(panel-slider): color-match muted knob to dimmed fill line - #6467
Open
heyssh wants to merge 2 commits into
Open
fix(panel-slider): color-match muted knob to dimmed fill line#6467heyssh wants to merge 2 commits into
heyssh wants to merge 2 commits into
Conversation
Add a property to PanelSlider. Track/fill/ticks fade via opacity as before, but the knob is never faded via opacity -- that made it semi-transparent and let the fill/track boundary show through its center as a seam. Instead the knob's solid color is blended to exactly match the composited color of the dimmed fill line (fill*0.5 + track*0.25 + background*0.25), so it stays fully opaque (no seam) while reading as the same muted color as the line. Panel.qml: switch OUTPUT, INPUT, per-stream, and media-volume sliders from to .
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opaque color-based dimming for muted audio sliders to prevent visible seams.
Changes:
- Adds
PanelSlider.dimmedrendering. - Applies dimming to audio sliders.
- Alters audio mute controls and right-click behavior.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
shell/Ui/PanelSlider.qml |
Adds dimmed slider colors and changes mouse handling. |
shell/plugins/panels/audio/Panel.qml |
Uses dimmed sliders and modifies mute controls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+37
to
+41
| readonly property color _dimmedLineColor: Qt.rgba( | ||
| fillColor.r * 0.5 + trackColor.r * 0.25 + _dimBackdrop.r * 0.25, | ||
| fillColor.g * 0.5 + trackColor.g * 0.25 + _dimBackdrop.g * 0.25, | ||
| fillColor.b * 0.5 + trackColor.b * 0.25 + _dimBackdrop.b * 0.25, | ||
| 1) |
| hoverEnabled: true | ||
| cursorShape: Qt.PointingHandCursor | ||
| acceptedButtons: Qt.LeftButton | Qt.RightButton | ||
| acceptedButtons: Qt.LeftButton |
| // Enter/Space: activate whatever the cursor is on. | ||
| function activateCursor() { | ||
| if (focusSection === "header") { toggleAllMuted(); return } | ||
| if (focusSection === "header") { toggleOutputMute(); return } |
| // be let through: muting republishes the PipeWire snapshot, and clamping | ||
| // would knock the cursor off the hero switch on every toggle. | ||
| if (focusSection === "header") return | ||
| if (sections.indexOf(focusSection) < 0) { |
PanelSlider.qml: add a property. Track/fill/ticks still fade via opacity, but the knob's *color* is blended toward the panel background instead, so it stays fully opaque and the fill/track seam underneath can't show through its center. The blend uses the same two-step over-compositing the dimmed line itself is built from (track over background, then fill over that), accounting for each color's own alpha rather than a flat 0.5, so the knob matches the line's actual composited color. Panel.qml: switch the output, input, and per-stream sliders from to when muted. Only that one property changed on each slider -- right-click-to-mute, the hero ToggleSwitch (mutes both channels), and keyboard toggling are untouched and keep working as before.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
shell/Ui/PanelSlider.qml:47
- This backdrop is not the surface beneath panel sliders.
KeyboardPanel.qml:300paints flyouts withColor.popups.background, whilebar.backgroundis independently themeable (Color.qml:73-80anddefault/themed/shell.toml.tpl:5-8,122-130). On themes where those roles differ, the computed knob color will not match the composited dimmed fill, reintroducing the visible boundary this change is meant to remove. Use the popup surface color as the default backdrop (and keep it overridable for non-popup uses).
readonly property color _dimBackdrop: bar ? bar.background : "#101315"
Comment on lines
+642
to
+645
| var wheel = Util.wheelSteps(root.wheelAccumulator, delta) | ||
| root.wheelAccumulator = wheel.remainder | ||
| if (wheel.steps === 0) return | ||
| var volume = root.setOutputVolume(root.outputVolume + wheel.steps * 0.05) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a property to PanelSlider. Track/fill/ticks fade via opacity as before, but the knob is never faded via opacity -- that made it semi-transparent and let the fill/track boundary show through its center as a seam. Instead the knob's solid color is blended to exactly match the composited color of the dimmed fill line (fill0.5 + track0.25 + background*0.25), so it stays fully opaque (no seam) while reading as the same muted color as the line.
Panel.qml: switch OUTPUT, INPUT, per-stream, and media-volume sliders from to .
Before:

After:
