Added a useful popup to the topic bar. Should probably be beautified though...
[quassel.git] / src / qtui / topicbutton.cpp
index a31c69d..4c26bfc 100644 (file)
@@ -36,6 +36,7 @@ TopicButton::TopicButton(QWidget *parent)
   : QAbstractButton(parent)
 {
   setFixedHeight(QFontMetrics(qApp->font()).height());
+  setToolTip(tr("Click to edit!"));
 }
 
 void TopicButton::paintEvent(QPaintEvent *event) {
@@ -74,4 +75,8 @@ void TopicButton::setAndStyleText(const QString &text) {
     height = QFontMetrics(qApp->font()).height();
   
   setFixedHeight(height);
+  
+  // show topic in tooltip
+  setToolTip(tr("%1\n\nClick to edit!").arg(QAbstractButton::text()));
 }
+