mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +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) {
|
if (pms > 0) {
|
||||||
int const gap = 3;
|
int const gap = 3;
|
||||||
QPixmap tpixmap(pms * (bpixmap.width() + gap), bpixmap.height());
|
QPixmap tpixmap(pms * (bpixmap.width() + gap), bpixmap.height());
|
||||||
tpixmap.fill();
|
tpixmap.fill(Qt::transparent);
|
||||||
QPainter painter(&tpixmap);
|
QPainter painter(&tpixmap);
|
||||||
int x = 0;
|
int x = 0;
|
||||||
|
|
||||||
@ -263,9 +263,20 @@ void GuiSearchWidget::handleIndicators()
|
|||||||
x += spixmap.width() + gap;
|
x += spixmap.width() + gap;
|
||||||
}
|
}
|
||||||
tip += "</ul>";
|
tip += "</ul>";
|
||||||
|
painter.end();
|
||||||
|
if (guiApp && guiApp->isInDarkMode()) {
|
||||||
|
QImage img = tpixmap.toImage();
|
||||||
|
img.invertPixels();
|
||||||
|
tpixmap.convertFromImage(img);
|
||||||
|
}
|
||||||
findLE_->setButtonPixmap(FancyLineEdit::Right, tpixmap);
|
findLE_->setButtonPixmap(FancyLineEdit::Right, tpixmap);
|
||||||
} else {
|
} else {
|
||||||
tip = qt_("Click here to change search options");
|
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);
|
findLE_->setButtonPixmap(FancyLineEdit::Right, bpixmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user