mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +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");
|
joinRoomIcon.addFile(":/icons/icons/ui/speech-bubbles-comment-option.png");
|
||||||
|
|
||||||
settingsBtn_ = new FlatButton(this);
|
settingsBtn_ = new FlatButton(this);
|
||||||
|
settingsBtn_->setToolTip(tr("User settings"));
|
||||||
settingsBtn_->setIcon(settingsIcon);
|
settingsBtn_->setIcon(settingsIcon);
|
||||||
settingsBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
|
settingsBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
|
||||||
settingsBtn_->setIconSize(
|
settingsBtn_->setIconSize(
|
||||||
|
@ -52,6 +53,7 @@ SideBarActions::SideBarActions(QWidget *parent)
|
||||||
addMenu_->addAction(joinRoomAction_);
|
addMenu_->addAction(joinRoomAction_);
|
||||||
|
|
||||||
createRoomBtn_ = new FlatButton(this);
|
createRoomBtn_ = new FlatButton(this);
|
||||||
|
createRoomBtn_->setToolTip(tr("Start a new chat"));
|
||||||
createRoomBtn_->setIcon(createRoomIcon);
|
createRoomBtn_->setIcon(createRoomIcon);
|
||||||
createRoomBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
|
createRoomBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
|
||||||
createRoomBtn_->setIconSize(
|
createRoomBtn_->setIconSize(
|
||||||
|
@ -65,14 +67,16 @@ SideBarActions::SideBarActions(QWidget *parent)
|
||||||
QPoint(pos.x() + padding, pos.y() - padding - addMenu_->sizeHint().height()));
|
QPoint(pos.x() + padding, pos.y() - padding - addMenu_->sizeHint().height()));
|
||||||
});
|
});
|
||||||
|
|
||||||
joinRoomBtn_ = new FlatButton(this);
|
roomDirectory_ = new FlatButton(this);
|
||||||
joinRoomBtn_->setIcon(joinRoomIcon);
|
roomDirectory_->setToolTip(tr("Room directory"));
|
||||||
joinRoomBtn_->setCornerRadius(conf::sidebarActions::iconSize / 2);
|
roomDirectory_->setEnabled(false);
|
||||||
joinRoomBtn_->setIconSize(
|
roomDirectory_->setIcon(joinRoomIcon);
|
||||||
|
roomDirectory_->setCornerRadius(conf::sidebarActions::iconSize / 2);
|
||||||
|
roomDirectory_->setIconSize(
|
||||||
QSize(conf::sidebarActions::iconSize, conf::sidebarActions::iconSize));
|
QSize(conf::sidebarActions::iconSize, conf::sidebarActions::iconSize));
|
||||||
|
|
||||||
layout_->addWidget(createRoomBtn_);
|
layout_->addWidget(createRoomBtn_);
|
||||||
layout_->addWidget(joinRoomBtn_);
|
layout_->addWidget(roomDirectory_);
|
||||||
layout_->addWidget(settingsBtn_);
|
layout_->addWidget(settingsBtn_);
|
||||||
|
|
||||||
connect(settingsBtn_, &QPushButton::clicked, this, &SideBarActions::showSettings);
|
connect(settingsBtn_, &QPushButton::clicked, this, &SideBarActions::showSettings);
|
||||||
|
@ -84,10 +88,10 @@ SideBarActions::resizeEvent(QResizeEvent *event)
|
||||||
Q_UNUSED(event);
|
Q_UNUSED(event);
|
||||||
|
|
||||||
if (width() <= ui::sidebar::SmallSize) {
|
if (width() <= ui::sidebar::SmallSize) {
|
||||||
joinRoomBtn_->hide();
|
roomDirectory_->hide();
|
||||||
createRoomBtn_->hide();
|
createRoomBtn_->hide();
|
||||||
} else {
|
} else {
|
||||||
joinRoomBtn_->show();
|
roomDirectory_->show();
|
||||||
createRoomBtn_->show();
|
createRoomBtn_->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ private:
|
||||||
|
|
||||||
FlatButton *settingsBtn_;
|
FlatButton *settingsBtn_;
|
||||||
FlatButton *createRoomBtn_;
|
FlatButton *createRoomBtn_;
|
||||||
FlatButton *joinRoomBtn_;
|
FlatButton *roomDirectory_;
|
||||||
|
|
||||||
QColor borderColor_;
|
QColor borderColor_;
|
||||||
};
|
};
|
||||||
|
|
|
@ -428,6 +428,7 @@ TextInputWidget::TextInputWidget(QWidget *parent)
|
||||||
send_file_icon.addFile(":/icons/icons/ui/paper-clip-outline.png");
|
send_file_icon.addFile(":/icons/icons/ui/paper-clip-outline.png");
|
||||||
|
|
||||||
sendFileBtn_ = new FlatButton(this);
|
sendFileBtn_ = new FlatButton(this);
|
||||||
|
sendFileBtn_->setToolTip(tr("Send a file"));
|
||||||
sendFileBtn_->setIcon(send_file_icon);
|
sendFileBtn_->setIcon(send_file_icon);
|
||||||
sendFileBtn_->setIconSize(QSize(ButtonHeight, ButtonHeight));
|
sendFileBtn_->setIconSize(QSize(ButtonHeight, ButtonHeight));
|
||||||
|
|
||||||
|
@ -469,6 +470,7 @@ TextInputWidget::TextInputWidget(QWidget *parent)
|
||||||
});
|
});
|
||||||
|
|
||||||
sendMessageBtn_ = new FlatButton(this);
|
sendMessageBtn_ = new FlatButton(this);
|
||||||
|
sendMessageBtn_->setToolTip(tr("Send a message"));
|
||||||
|
|
||||||
QIcon send_message_icon;
|
QIcon send_message_icon;
|
||||||
send_message_icon.addFile(":/icons/icons/ui/cursor.png");
|
send_message_icon.addFile(":/icons/icons/ui/cursor.png");
|
||||||
|
|
|
@ -65,6 +65,7 @@ TopRoomBar::TopRoomBar(QWidget *parent)
|
||||||
textLayout_->addWidget(topicLabel_);
|
textLayout_->addWidget(topicLabel_);
|
||||||
|
|
||||||
settingsBtn_ = new FlatButton(this);
|
settingsBtn_ = new FlatButton(this);
|
||||||
|
settingsBtn_->setToolTip(tr("Room options"));
|
||||||
settingsBtn_->setFixedSize(buttonSize_, buttonSize_);
|
settingsBtn_->setFixedSize(buttonSize_, buttonSize_);
|
||||||
settingsBtn_->setCornerRadius(buttonSize_ / 2);
|
settingsBtn_->setCornerRadius(buttonSize_ / 2);
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
|
||||||
buttonLayout_->setMargin(0);
|
buttonLayout_->setMargin(0);
|
||||||
|
|
||||||
logoutButton_ = new FlatButton(this);
|
logoutButton_ = new FlatButton(this);
|
||||||
|
logoutButton_->setToolTip(tr("Logout"));
|
||||||
logoutButton_->setCornerRadius(logoutButtonSize_ / 2);
|
logoutButton_->setCornerRadius(logoutButtonSize_ / 2);
|
||||||
|
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
|
|
Loading…
Reference in a new issue