summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-25 23:28:37 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-07-25 23:28:37 +0300
commit899249a4851c725717bdac75a06b8f5b47782872 (patch)
tree3d900939fc8379b0c794e4f0cc4eb0830a67ce69
parentUse repaint instead of update on the loading animation (diff)
downloadnheko-899249a4851c725717bdac75a06b8f5b47782872.tar.xz
Add missing tooltips on buttons
fixes #249
-rw-r--r--src/SideBarActions.cpp18
-rw-r--r--src/SideBarActions.h2
-rw-r--r--src/TextInputWidget.cpp2
-rw-r--r--src/TopRoomBar.cpp1
-rw-r--r--src/UserInfoWidget.cpp1
5 files changed, 16 insertions, 8 deletions
diff --git a/src/SideBarActions.cpp b/src/SideBarActions.cpp
index b2a01e3e..2b66749f 100644
--- a/src/SideBarActions.cpp
+++ b/src/SideBarActions.cpp
@@ -29,6 +29,7 @@ SideBarActions::SideBarActions(QWidget *parent)
         joinRoomIcon.addFile(":/icons/icons/ui/speech-bubbles-comment-option.png");
 
         settingsBtn_ = new FlatButton(this);
+        settingsBtn_->setToolTip(tr("User settings"));
         settingsBtn_->setIcon(settingsIcon);
         settingsBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
         settingsBtn_->setIconSize(
@@ -52,6 +53,7 @@ SideBarActions::SideBarActions(QWidget *parent)
         addMenu_->addAction(joinRoomAction_);
 
         createRoomBtn_ = new FlatButton(this);
+        createRoomBtn_->setToolTip(tr("Start a new chat"));
         createRoomBtn_->setIcon(createRoomIcon);
         createRoomBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
         createRoomBtn_->setIconSize(
@@ -65,14 +67,16 @@ SideBarActions::SideBarActions(QWidget *parent)
                   QPoint(pos.x() + padding, pos.y() - padding - addMenu_->sizeHint().height()));
         });
 
-        joinRoomBtn_ = new FlatButton(this);
-        joinRoomBtn_->setIcon(joinRoomIcon);
-        joinRoomBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
-        joinRoomBtn_->setIconSize(
+        roomDirectory_ = new FlatButton(this);
+        roomDirectory_->setToolTip(tr("Room directory"));
+        roomDirectory_->setEnabled(false);
+        roomDirectory_->setIcon(joinRoomIcon);
+        roomDirectory_->setCornerRadius(conf::sidebarActions::iconSize / 2);
+        roomDirectory_->setIconSize(
           QSize(conf::sidebarActions::iconSize, conf::sidebarActions::iconSize));
 
         layout_->addWidget(createRoomBtn_);
-        layout_->addWidget(joinRoomBtn_);
+        layout_->addWidget(roomDirectory_);
         layout_->addWidget(settingsBtn_);
 
         connect(settingsBtn_, &QPushButton::clicked, this, &SideBarActions::showSettings);
@@ -84,10 +88,10 @@ SideBarActions::resizeEvent(QResizeEvent *event)
         Q_UNUSED(event);
 
         if (width() <= ui::sidebar::SmallSize) {
-                joinRoomBtn_->hide();
+                roomDirectory_->hide();
                 createRoomBtn_->hide();
         } else {
-                joinRoomBtn_->show();
+                roomDirectory_->show();
                 createRoomBtn_->show();
         }
 }
diff --git a/src/SideBarActions.h b/src/SideBarActions.h
index f97c72de..ce96cba8 100644
--- a/src/SideBarActions.h
+++ b/src/SideBarActions.h
@@ -44,7 +44,7 @@ private:
 
         FlatButton *settingsBtn_;
         FlatButton *createRoomBtn_;
-        FlatButton *joinRoomBtn_;
+        FlatButton *roomDirectory_;
 
         QColor borderColor_;
 };
diff --git a/src/TextInputWidget.cpp b/src/TextInputWidget.cpp
index a419ed84..897e2a76 100644
--- a/src/TextInputWidget.cpp
+++ b/src/TextInputWidget.cpp
@@ -428,6 +428,7 @@ TextInputWidget::TextInputWidget(QWidget *parent)
         send_file_icon.addFile(":/icons/icons/ui/paper-clip-outline.png");
 
         sendFileBtn_ = new FlatButton(this);
+        sendFileBtn_->setToolTip(tr("Send a file"));
         sendFileBtn_->setIcon(send_file_icon);
         sendFileBtn_->setIconSize(QSize(ButtonHeight, ButtonHeight));
 
@@ -469,6 +470,7 @@ TextInputWidget::TextInputWidget(QWidget *parent)
         });
 
         sendMessageBtn_ = new FlatButton(this);
+        sendMessageBtn_->setToolTip(tr("Send a message"));
 
         QIcon send_message_icon;
         send_message_icon.addFile(":/icons/icons/ui/cursor.png");
diff --git a/src/TopRoomBar.cpp b/src/TopRoomBar.cpp
index c9609788..d9c4a3ae 100644
--- a/src/TopRoomBar.cpp
+++ b/src/TopRoomBar.cpp
@@ -65,6 +65,7 @@ TopRoomBar::TopRoomBar(QWidget *parent)
         textLayout_->addWidget(topicLabel_);
 
         settingsBtn_ = new FlatButton(this);
+        settingsBtn_->setToolTip(tr("Room options"));
         settingsBtn_->setFixedSize(buttonSize_, buttonSize_);
         settingsBtn_->setCornerRadius(buttonSize_ / 2);
 
diff --git a/src/UserInfoWidget.cpp b/src/UserInfoWidget.cpp
index 1470fc25..b2860028 100644
--- a/src/UserInfoWidget.cpp
+++ b/src/UserInfoWidget.cpp
@@ -75,6 +75,7 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
         buttonLayout_->setMargin(0);
 
         logoutButton_ = new FlatButton(this);
+        logoutButton_->setToolTip(tr("Logout"));
         logoutButton_->setCornerRadius(logoutButtonSize_ / 2);
 
         QIcon icon;