Skip to content

Commit

Permalink
Merge pull request #1162 from leo78913/i-hate-naming-branches
Browse files Browse the repository at this point in the history
  • Loading branch information
TayouVR committed Jun 12, 2023
2 parents 9406022 + d6c7b4e commit b174f82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 6 additions & 3 deletions launcher/ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi

}

// set the menu for the folders help, and accounts tool buttons
// set the menu for the folders help, accounts, and export tool buttons
{
auto foldersMenuButton = dynamic_cast<QToolButton*>(ui->mainToolBar->widgetForAction(ui->actionFoldersButton));
ui->actionFoldersButton->setMenu(ui->foldersMenu);
Expand All @@ -201,6 +201,11 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi

auto accountMenuButton = dynamic_cast<QToolButton*>(ui->mainToolBar->widgetForAction(ui->actionAccountsButton));
accountMenuButton->setPopupMode(QToolButton::InstantPopup);

auto exportInstanceMenu = new QMenu(this);
exportInstanceMenu->addAction(ui->actionExportInstanceZip);
exportInstanceMenu->addAction(ui->actionExportInstanceMrPack);
ui->actionExportInstance->setMenu(exportInstanceMenu);
}

// hide, disable and show stuff
Expand Down Expand Up @@ -397,8 +402,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// removing this looks stupid
view->setFocus();

ui->actionExportInstance->setMenu(ui->exportInstanceMenu);

retranslateUi();
}

Expand Down
10 changes: 6 additions & 4 deletions launcher/ui/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,6 @@
<addaction name="actionChangeInstGroup"/>
<addaction name="actionViewSelectedInstFolder"/>
<addaction name="actionExportInstance"/>
<widget class="QMenu" name="exportInstanceMenu">
<addaction name="actionExportInstanceZip"/>
<addaction name="actionExportInstanceMrPack"/>
</widget>
<addaction name="actionCopyInstance"/>
<addaction name="actionDeleteInstance"/>
<addaction name="actionCreateInstanceShortcut"/>
Expand Down Expand Up @@ -467,11 +463,17 @@
</property>
</action>
<action name="actionExportInstanceZip">
<property name="icon">
<iconset theme="launcher"/>
</property>
<property name="text">
<string>Prism Launcher (zip)</string>
</property>
</action>
<action name="actionExportInstanceMrPack">
<property name="icon">
<iconset theme="modrinth"/>
</property>
<property name="text">
<string>Modrinth (mrpack)</string>
</property>
Expand Down

0 comments on commit b174f82

Please sign in to comment.