Add TaskbarNotificationBackend
[quassel.git] / src / qtui / chatviewsearchbar.cpp
index 5524691..bfa79e1 100644 (file)
 
 #include "action.h"
 #include "actioncollection.h"
+#include "iconloader.h"
 #include "qtui.h"
 
 ChatViewSearchBar::ChatViewSearchBar(QWidget *parent)
   : QWidget(parent)
 {
   ui.setupUi(this);
+  ui.hideButton->setIcon(BarIcon("dialog-close"));
+  ui.searchUpButton->setIcon(SmallIcon("go-up"));
+  ui.searchDownButton->setIcon(SmallIcon("go-down"));
+
   layout()->setContentsMargins(0, 0, 0, 0);
 
   hide();
@@ -47,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();
 }