FindToolBar: Add support for "lightcolored" panels

The labels need to be polished so that they get the right palette,
and the icon needs to be switched from light to dark.

Change-Id: I3e37947e741c3d92f3c1ac3bb02e631aa7803f59
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Daniel Teske
2014-08-11 17:31:27 +02:00
parent b7f1c93495
commit 7d5d9b4d0f
13 changed files with 58 additions and 18 deletions

View File

@@ -93,7 +93,7 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
connect(m_ui.findEdit, SIGNAL(editingFinished()), this, SLOT(invokeResetIncrementalSearch()));
m_ui.close->setIcon(QIcon(QLatin1String(Core::Constants::ICON_BUTTON_CLOSE)));
setLightColoredIcon(false);
connect(m_ui.close, SIGNAL(clicked()), this, SLOT(hideAndResetFocus()));
m_findCompleter->setModel(m_plugin->findCompletionModel());
@@ -821,6 +821,12 @@ void FindToolBar::setBackward(bool backward)
setFindFlag(FindBackward, backward);
}
void FindToolBar::setLightColoredIcon(bool lightColored)
{
m_ui.close->setIcon(lightColored ? QIcon(QLatin1String(Core::Constants::ICON_DARK_CLOSE))
: QIcon(QLatin1String(Core::Constants::ICON_BUTTON_CLOSE)));
}
OptionsPopup::OptionsPopup(QWidget *parent)
: QWidget(parent, Qt::Popup)
{