mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
parent
a845ccb8d7
commit
899249a485
5 changed files with 16 additions and 8 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ private:
|
|||
|
||||
FlatButton *settingsBtn_;
|
||||
FlatButton *createRoomBtn_;
|
||||
FlatButton *joinRoomBtn_;
|
||||
FlatButton *roomDirectory_;
|
||||
|
||||
QColor borderColor_;
|
||||
};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue