Skip to content

fix(panel-slider): color-match muted knob to dimmed fill line - #6467

Open
heyssh wants to merge 2 commits into
basecamp:quattrofrom
heyssh:fix/muted-slider-knob-color
Open

fix(panel-slider): color-match muted knob to dimmed fill line#6467
heyssh wants to merge 2 commits into
basecamp:quattrofrom
heyssh:fix/muted-slider-knob-color

Conversation

@heyssh

@heyssh heyssh commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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:
screenshot-2026-07-31_23-19-06

After:
image

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 .
Copilot AI review requested due to automatic review settings July 31, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds opaque color-based dimming for muted audio sliders to prevent visible seams.

Changes:

  • Adds PanelSlider.dimmed rendering.
  • 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 thread shell/Ui/PanelSlider.qml
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)
Comment thread shell/Ui/PanelSlider.qml Outdated
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton
acceptedButtons: Qt.LeftButton
Comment thread shell/plugins/panels/audio/Panel.qml Outdated
// 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.
Copilot AI review requested due to automatic review settings August 1, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:300 paints flyouts with Color.popups.background, while bar.background is independently themeable (Color.qml:73-80 and default/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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants