mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
GuiSearch: properly display indicators in dark mode
This commit is contained in:
parent
672ff09634
commit
9ee73dbb30
@ -226,7 +226,7 @@ void GuiSearchWidget::handleIndicators()
|
||||
if (pms > 0) {
|
||||
int const gap = 3;
|
||||
QPixmap tpixmap(pms * (bpixmap.width() + gap), bpixmap.height());
|
||||
tpixmap.fill();
|
||||
tpixmap.fill(Qt::transparent);
|
||||
QPainter painter(&tpixmap);
|
||||
int x = 0;
|
||||
|
||||
@ -263,9 +263,20 @@ void GuiSearchWidget::handleIndicators()
|
||||
x += spixmap.width() + gap;
|
||||
}
|
||||
tip += "</ul>";
|
||||
painter.end();
|
||||
if (guiApp && guiApp->isInDarkMode()) {
|
||||
QImage img = tpixmap.toImage();
|
||||
img.invertPixels();
|
||||
tpixmap.convertFromImage(img);
|
||||
}
|
||||
findLE_->setButtonPixmap(FancyLineEdit::Right, tpixmap);
|
||||
} else {
|
||||
tip = qt_("Click here to change search options");
|
||||
if (guiApp && guiApp->isInDarkMode()) {
|
||||
QImage img = bpixmap.toImage();
|
||||
img.invertPixels();
|
||||
bpixmap.convertFromImage(img);
|
||||
}
|
||||
findLE_->setButtonPixmap(FancyLineEdit::Right, bpixmap);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user