Bug 410671

Summary: Provide a way to override just the accent color
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: Nate Graham <nate>
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=410672
Latest Commit: Version Fixed In:

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?