forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user