Add grey styling for locked/disabled sliders and controls#415
Merged
Conversation
Locked controls (e.g. analysis buffer under roll average, flatfield k1 with no reference profile) looked identical to normal enabled ones since no :disabled state existed in the app QSS. Adds a global grey :disabled treatment for sliders, buttons, and fields, plus explicit handling for CompactSlider/HueSlider/KelvinSlider whose handle/label colors are painted inline and bypass QSS.
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.
Summary
:disabledstate at all.:disabledtreatment inmodern_dark.qssfor sliders (handle/groove/sub-page, including the cyan/magenta/yellow channel variants) and for buttons/combos/fields — applies automatically to every existingsetEnabled(False)call site, no per-callsite changes needed.CompactSlider's label andHueSlider/KelvinSlider's handle tint are painted via inlinesetStyleSheet(bypasses QSS), so these get an explicitsetEnabledoverride that repaints them muted grey when locked. Locked takes priority over the "edited" amber indicator.Test plan
make lintmake typemake test(1182 passed, 4 skipped, 1 xfailed)test_compact_slider_locked_style_overrides_editedandtest_kelvin_slider_locked_handle_is_mutedtotests/test_slider_widgets.py