diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-08-14 02:27:01 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-08-14 02:27:01 +0200 |
commit | 0adb572a07d13a35bdb378ba024655de6a9967b3 (patch) | |
tree | 9c2d1b4b0e45669f181841adc584017549e86648 /application/MainWindow.cpp | |
parent | 8ed10c5b8142243481305c5cba8318eed2f4a120 (diff) | |
download | MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar.gz MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar.lz MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.tar.xz MultiMC-0adb572a07d13a35bdb378ba024655de6a9967b3.zip |
NOISSUE improve account UI
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r-- | application/MainWindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 0747e442..d5fcc6f0 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -519,7 +519,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi repopulateAccountsMenu(); accountMenuButton = new QToolButton(this); - accountMenuButton->setText(tr("Accounts")); + accountMenuButton->setText(tr("Profiles")); accountMenuButton->setMenu(accountMenu); accountMenuButton->setPopupMode(QToolButton::InstantPopup); accountMenuButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); @@ -753,8 +753,6 @@ void MainWindow::repopulateAccountsMenu() QAction *action = new QAction(tr("No accounts added!"), this); action->setEnabled(false); accountMenu->addAction(action); - - accountMenu->addSeparator(); } else { @@ -764,9 +762,11 @@ void MainWindow::repopulateAccountsMenu() MojangAccountPtr account = accounts->at(i); // Styling hack + /* QAction *section = new QAction(account->username(), this); section->setEnabled(false); accountMenu->addAction(section); + */ for (auto profile : account->profiles()) { @@ -782,11 +782,11 @@ void MainWindow::repopulateAccountsMenu() accountMenu->addAction(action); connect(action, SIGNAL(triggered(bool)), SLOT(changeActiveAccount())); } - - accountMenu->addSeparator(); } } + accountMenu->addSeparator(); + QAction *action = new QAction(tr("No Default Account"), this); action->setCheckable(true); action->setIcon(MMC->getThemedIcon("noaccount")); @@ -838,12 +838,14 @@ void MainWindow::activeAccountChanged() if (profile != nullptr) { accountMenuButton->setIcon(SkinUtils::getFaceFromCache(profile->name)); + accountMenuButton->setText(profile->name); return; } } // Set the icon to the "no account" icon. accountMenuButton->setIcon(MMC->getThemedIcon("noaccount")); + accountMenuButton->setText(tr("Profiles")); } bool MainWindow::eventFilter(QObject *obj, QEvent *ev) |