forked from qt-creator/qt-creator
Utils: Let FancyLineEdit have QIcons instead of QPixmaps
A QIcon contains variants for different resolutions. This change makes sure that in a Multi-screen/mixed-scaling-mode scenario, the right of those resolutions is chosen, depending on which screen the line edit currently is. Task-number: QTCREATORBUG-18869 Change-Id: I8775e9e2c9b15c2863e9415751e1306f9e43c9aa Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -666,11 +666,11 @@ void FindToolBar::updateIcons()
|
||||
bool regexp = effectiveFlags & FindRegularExpression;
|
||||
bool preserveCase = effectiveFlags & FindPreserveCase;
|
||||
if (!casesensitive && !wholewords && !regexp && !preserveCase) {
|
||||
const QPixmap pixmap = Utils::Icons::MAGNIFIER.pixmap();
|
||||
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left, pixmap);
|
||||
const QIcon icon = Utils::Icons::MAGNIFIER.icon();
|
||||
m_ui.findEdit->setButtonIcon(Utils::FancyLineEdit::Left, icon);
|
||||
} else {
|
||||
m_ui.findEdit->setButtonPixmap(Utils::FancyLineEdit::Left,
|
||||
IFindFilter::pixmapForFindFlags(effectiveFlags));
|
||||
m_ui.findEdit->setButtonIcon(Utils::FancyLineEdit::Left,
|
||||
IFindFilter::pixmapForFindFlags(effectiveFlags));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user