added username in the titlebar
This commit is contained in:
@@ -39,9 +39,14 @@ Window::Window(const QString &windowName, singletons::ThemeManager &_themeManage
|
||||
this->addTitleBarButton(TitleBarButton::Settings, [] {
|
||||
singletons::WindowManager::getInstance().showSettingsDialog();
|
||||
});
|
||||
this->addTitleBarButton(TitleBarButton::User, [this] {
|
||||
auto user = this->addTitleBarLabel([this] {
|
||||
singletons::WindowManager::getInstance().showAccountSelectPopup(QCursor::pos());
|
||||
});
|
||||
|
||||
singletons::AccountManager::getInstance().Twitch.userChanged.connect([this, user] {
|
||||
user->getLabel().setText(
|
||||
singletons::AccountManager::getInstance().Twitch.getCurrent()->getUserName());
|
||||
});
|
||||
}
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
|
||||
Reference in New Issue
Block a user