Scrollbars now use the proper colours for active and inactive windows.
Diff Detail
- Repository
- R98 Breeze for Gtk
- Branch
- fix-scrollbar-states (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 16854 Build 16872: arc lint + arc unit
Hmm, I don't think this is the right fix. Now active scrollbars look much too dark compared to the QWidgets version (at least with a breeze-not-dark color scheme):
Furthermore, sliders' backgrounds are also now too dark:
src/gtk3/widgets/_scrollbar.scss | ||
---|---|---|
123 ↗ | (On Diff #66566) | This needs to be 0.3 to match the Breeze QStyle |
Actually, not sure if this code works how I think it works. 0.2 should actually be less dark than 0.3 if I understand it correctly.
This is the code in the Breeze QStyle:
const auto grooveColor( _helper->alphaColor( palette.color( QPalette::WindowText ), 0.3 ) );
Here's how alphaColor() works:
QColor Helper::alphaColor( QColor color, qreal alpha ) const { if( alpha >= 0 && alpha < 1.0 ) { color.setAlphaF( alpha*color.alphaF() ); } return color; }
The alpha of the original color is multiplied with the alpha value from the alpha parameter.
For example, 0.30 * 1.00 = 0.30 and 0.30 * 0.80 = 0.24
Now with Breeze Light, the scrollbar handle is back to being dark when the window is inactive. :)
Sliders look fixed, but the scrollbar still isn't right. The scrollbar should have the same groove color as the sliders.
const auto color( _helper->alphaColor( palette.color( QPalette::WindowText ), 0.3 * (animated ? opacity : 1) ) );
If animated, use animation opacity, which results in the element fading in, usually on hover (ignore this if it's not applicable or not practical)
Else, opacity is 30%