Bug 410671 - Provide a way to override just the accent color
Summary: Provide a way to override just the accent color
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-06 21:08 UTC by Nate Graham
Modified: 2020-01-03 17:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2019-08-06 21:08:24 UTC
The Elisa music player is using QML sliders for the playback position and volume level controls. The default qqc2-desktop-style slider appearance colors the area left of the handle with a color from the color scheme--which is blue by default with the Breeze color scheme.

In Elisa, this large blue area is distracting and not useful, so we've created a custom style to work around that (https://cgit.kde.org/elisa.git/tree/src/qml/MediaPlayerControl.qml#n194). Unfortunately, this has required a lot of custom code that is not ideal and we'd like to be more upstream-friendly.

It would be nice if there was a way to pass a standard slider a color and have it use that color for the area left of the handle instead of the color scheme color. This would allow us to customize just that visual aspect of the slider and not re-implement the whole thing from scratch.

I was unsure if Qt or the desktop style was the correct place to implement this, so please let me know if this isn't right.
Comment 1 David Edmundson 2020-01-02 00:33:01 UTC
Wrap it in a colorscope change the relevant colour? 

Our style should then follow it.


See

Slider.qml
    @DISABLE_UNDER_QQC2_2_4@ palette: Kirigami.Theme.palette

and 

KQuickStyleItem::resolvePalette()
Comment 2 Nate Graham 2020-01-03 17:54:55 UTC
Isn't ColorScope a Plasma component though? How would you do that for a pure QQC2 Slider?