https://bugs.kde.org/show_bug.cgi?id=521496
Bug ID: 521496
Summary: Cannot set background color on QScollArea viewport
Classification: Plasma
Product: Breeze
Version First 6.6.5
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: QStyle
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Target Milestone: ---
DESCRIPTION
Changing the color of `QPalette::Window` for `QScrollArea::viewport()` works
fine for Qt's built in styles, but not for breeze.
Instead of using the specified color, it seems to render using the original
color. Possibly it's `QScrollArea` that's rendering the background instead of
the viewport.
Also, the scroll bars change color from light gray to dark gray when doing
this. Which is surprising, as they should be siblings to the viewport and
fairly independent.
STEPS TO REPRODUCE
```C++
QPalette bg(scrollArea->viewport()->palette());
bg.setColor(QPalette::Window, QColor::fromRgb(40, 40, 40));
scrollArea->viewport()->setPalette(bg);
scrollArea->viewport()->setAutoFillBackground(true);
```
OBSERVED RESULT
Light background, dark scrollbars.
EXPECTED RESULT
Dark background, light scrollbars.
SOFTWARE/OS VERSIONS
Operating System: Fedora 43
KDE Plasma Version: N/A
KDE Frameworks Version: 6.26.0-1.fc43.x86_64
Qt Version: 6.10.3-1.fc43.x86_64
Breeze version: 6.6.5-1.fc43.x86_64
ADDITIONAL INFORMATION
We're trying to port TigerVNC to Qt and wanted to make sure it is compatible
with Breeze. One feature we want to keep is to have a dark area around the
display, mimicking the behaviour of a local monitor. Setting the background on
the viewport seemed to be the most sensible way to do that without confusing
the scrollbar widgets.
--
You are receiving this mail because:
You are watching all bug changes.