mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Remove alpha component of system colors
When using system colors it may happen (on windows 11 in particular) that the background color is actually translucid. This is not something we are prepared to handle and it creates ghosts on screen. The fix is easy: the alpha channel of the colors is set to 255. Fixes bug #13084.
This commit is contained in:
parent
8664e2fa4d
commit
095bb18331
@ -86,7 +86,9 @@ QColor ColorCache::get(Color const & color, bool syscolors) const
|
|||||||
QPalette::ColorRole const cr = role(color.baseColor);
|
QPalette::ColorRole const cr = role(color.baseColor);
|
||||||
if (syscolors && cr != QPalette::NoRole) {
|
if (syscolors && cr != QPalette::NoRole) {
|
||||||
static QColor const white = Qt::white;
|
static QColor const white = Qt::white;
|
||||||
QColor const c = pal_.brush(QPalette::Active, cr).color();
|
QColor c = pal_.brush(QPalette::Active, cr).color();
|
||||||
|
// Change to fully opaque color
|
||||||
|
c.setAlpha(255);
|
||||||
if (cr == QPalette::Base && c == white)
|
if (cr == QPalette::Base && c == white)
|
||||||
return lcolors_[color.baseColor];
|
return lcolors_[color.baseColor];
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user