forked from qt-creator/qt-creator
Fixed the background of the icon in the search input
It was opaque, whereas now it adapts better with varying background colors.
This commit is contained in:
@@ -460,20 +460,20 @@ void FindToolBar::updateIcons()
|
|||||||
bool wholewords = effectiveFlags & IFindSupport::FindWholeWords;
|
bool wholewords = effectiveFlags & IFindSupport::FindWholeWords;
|
||||||
bool regexp = effectiveFlags & IFindSupport::FindRegularExpression;
|
bool regexp = effectiveFlags & IFindSupport::FindRegularExpression;
|
||||||
QPixmap pixmap(17, 17);
|
QPixmap pixmap(17, 17);
|
||||||
|
pixmap.fill(Qt::transparent);
|
||||||
QPainter painter(&pixmap);
|
QPainter painter(&pixmap);
|
||||||
painter.eraseRect(0, 0, 17, 17);
|
|
||||||
int x = 16;
|
int x = 16;
|
||||||
|
|
||||||
if (casesensitive) {
|
if (casesensitive) {
|
||||||
painter.drawPixmap(x-10, 0, m_casesensitiveIcon);
|
painter.drawPixmap(x - 10, 0, m_casesensitiveIcon);
|
||||||
x -= 6;
|
x -= 6;
|
||||||
}
|
}
|
||||||
if (wholewords) {
|
if (wholewords) {
|
||||||
painter.drawPixmap(x-10, 0, m_wholewordsIcon);
|
painter.drawPixmap(x - 10, 0, m_wholewordsIcon);
|
||||||
x -= 6;
|
x -= 6;
|
||||||
}
|
}
|
||||||
if (regexp) {
|
if (regexp) {
|
||||||
painter.drawPixmap(x-10, 0, m_regexpIcon);
|
painter.drawPixmap(x - 10, 0, m_regexpIcon);
|
||||||
}
|
}
|
||||||
if (!casesensitive && !wholewords && !regexp) {
|
if (!casesensitive && !wholewords && !regexp) {
|
||||||
QPixmap mag(Core::Constants::ICON_MAGNIFIER);
|
QPixmap mag(Core::Constants::ICON_MAGNIFIER);
|
||||||
|
Reference in New Issue
Block a user