X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatviewsearchbar.cpp;h=bfa79e1e065f29e7a5c293023f02a757c795aad9;hp=c4c6f095be1b6e2542bb1c35248e1d1cd7d93a17;hb=793459d97e7081a4f3db94357a55d74859571445;hpb=ba934ceb1bfe30d01d5fb5c072c3197f8080be04 diff --git a/src/qtui/chatviewsearchbar.cpp b/src/qtui/chatviewsearchbar.cpp index c4c6f095..bfa79e1e 100644 --- a/src/qtui/chatviewsearchbar.cpp +++ b/src/qtui/chatviewsearchbar.cpp @@ -22,16 +22,18 @@ #include "action.h" #include "actioncollection.h" +#include "iconloader.h" #include "qtui.h" ChatViewSearchBar::ChatViewSearchBar(QWidget *parent) : QWidget(parent) { ui.setupUi(this); - layout()->setContentsMargins(0, 0, 0, 0); + ui.hideButton->setIcon(BarIcon("dialog-close")); + ui.searchUpButton->setIcon(SmallIcon("go-up")); + ui.searchDownButton->setIcon(SmallIcon("go-down")); - ui.searchUpButton->setEnabled(false); - ui.searchDownButton->setEnabled(false); + layout()->setContentsMargins(0, 0, 0, 0); hide(); @@ -50,8 +52,11 @@ ChatViewSearchBar::ChatViewSearchBar(QWidget *parent) } void ChatViewSearchBar::setVisible(bool visible) { - QWidget::setVisible(visible); + // clearing the search field also removes the highlight items from the scene + // this should be done before the SearchBar is hidden, as the hiding triggers + // a resize event which can lead to strange side effects. ui.searchEditLine->clear(); + QWidget::setVisible(visible); if(visible) ui.searchEditLine->setFocus(); }