mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Fix the tab order of the launcher widget (closes #3616)
This commit is contained in:
@@ -189,30 +189,6 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC
|
||||
labelChoose->setObjectName("label_choose");
|
||||
}
|
||||
|
||||
_editProfileButton = new QPushButton("Edit", centralWidget);
|
||||
_editProfileButton->setObjectName("small");
|
||||
_editProfileButton->setGeometry(geometry::EditProfileButton);
|
||||
_editProfileButton->setCursor(Qt::PointingHandCursor);
|
||||
_editProfileButton->setAutoDefault(true);
|
||||
_editProfileButton->setAccessibleName("Edit profile");
|
||||
connect(
|
||||
_editProfileButton, &QPushButton::released,
|
||||
this, &LauncherWindow::editProfile
|
||||
);
|
||||
|
||||
{
|
||||
QPushButton* newProfileButton = new QPushButton("New", centralWidget);
|
||||
newProfileButton->setObjectName("small");
|
||||
newProfileButton->setGeometry(geometry::NewProfileButton);
|
||||
newProfileButton->setCursor(Qt::PointingHandCursor);
|
||||
newProfileButton->setAutoDefault(true);
|
||||
newProfileButton->setAccessibleName("New profile");
|
||||
connect(
|
||||
newProfileButton, &QPushButton::released,
|
||||
this, &LauncherWindow::newProfile
|
||||
);
|
||||
}
|
||||
|
||||
// Creating the profile box _after_ the Edit and New buttons as the comboboxes
|
||||
// `selectionChanged` signal will trigger that will try to make changes to the edit
|
||||
// button
|
||||
@@ -249,12 +225,36 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC
|
||||
this, &LauncherWindow::updateStartButton
|
||||
);
|
||||
|
||||
|
||||
_editProfileButton = new QPushButton("Edit", centralWidget);
|
||||
_editProfileButton->setObjectName("small");
|
||||
_editProfileButton->setGeometry(geometry::EditProfileButton);
|
||||
_editProfileButton->setCursor(Qt::PointingHandCursor);
|
||||
_editProfileButton->setAutoDefault(true);
|
||||
_editProfileButton->setAccessibleName("Edit profile");
|
||||
connect(
|
||||
_editProfileButton, &QPushButton::released,
|
||||
this, &LauncherWindow::editProfile
|
||||
);
|
||||
{
|
||||
// Set up the default value for the edit button
|
||||
std::string selection = std::get<1>(_profileBox->currentSelection());
|
||||
_editProfileButton->setEnabled(std::filesystem::exists(selection));
|
||||
}
|
||||
|
||||
{
|
||||
QPushButton* newProfileButton = new QPushButton("New", centralWidget);
|
||||
newProfileButton->setObjectName("small");
|
||||
newProfileButton->setGeometry(geometry::NewProfileButton);
|
||||
newProfileButton->setCursor(Qt::PointingHandCursor);
|
||||
newProfileButton->setAutoDefault(true);
|
||||
newProfileButton->setAccessibleName("New profile");
|
||||
connect(
|
||||
newProfileButton, &QPushButton::released,
|
||||
this, &LauncherWindow::newProfile
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
@@ -266,31 +266,6 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC
|
||||
optionsLabel->setObjectName("label_options");
|
||||
}
|
||||
|
||||
_editWindowButton = new QPushButton("Edit", centralWidget);
|
||||
_editWindowButton->setVisible(true);
|
||||
_editWindowButton->setObjectName("small");
|
||||
_editWindowButton->setGeometry(geometry::EditWindowButton);
|
||||
_editWindowButton->setCursor(Qt::PointingHandCursor);
|
||||
_editWindowButton->setAutoDefault(true);
|
||||
_editWindowButton->setAccessibleName("Edit window configuration");
|
||||
connect(
|
||||
_editWindowButton, &QPushButton::released,
|
||||
this, &LauncherWindow::editConfiguration
|
||||
);
|
||||
|
||||
{
|
||||
QPushButton* newWindowButton = new QPushButton("New", centralWidget);
|
||||
newWindowButton->setObjectName("small");
|
||||
newWindowButton->setGeometry(geometry::NewWindowButton);
|
||||
newWindowButton->setCursor(Qt::PointingHandCursor);
|
||||
newWindowButton->setAutoDefault(true);
|
||||
newWindowButton->setAccessibleName("New window configuration");
|
||||
connect(
|
||||
newWindowButton, &QPushButton::released,
|
||||
this, &LauncherWindow::newConfiguration
|
||||
);
|
||||
}
|
||||
|
||||
_windowConfigBox = new SplitComboBox(
|
||||
centralWidget,
|
||||
_userConfigPath,
|
||||
@@ -329,11 +304,36 @@ LauncherWindow::LauncherWindow(bool profileEnabled, const Configuration& globalC
|
||||
this, &LauncherWindow::updateStartButton
|
||||
);
|
||||
|
||||
|
||||
|
||||
_editWindowButton = new QPushButton("Edit", centralWidget);
|
||||
_editWindowButton->setVisible(true);
|
||||
_editWindowButton->setObjectName("small");
|
||||
_editWindowButton->setGeometry(geometry::EditWindowButton);
|
||||
_editWindowButton->setCursor(Qt::PointingHandCursor);
|
||||
_editWindowButton->setAutoDefault(true);
|
||||
_editWindowButton->setAccessibleName("Edit window configuration");
|
||||
connect(
|
||||
_editWindowButton, &QPushButton::released,
|
||||
this, &LauncherWindow::editConfiguration
|
||||
);
|
||||
{
|
||||
// Set up the default value for the edit button
|
||||
std::string selection = std::get<1>(_windowConfigBox->currentSelection());
|
||||
_editWindowButton->setEnabled(std::filesystem::exists(selection));
|
||||
}
|
||||
{
|
||||
QPushButton* newWindowButton = new QPushButton("New", centralWidget);
|
||||
newWindowButton->setObjectName("small");
|
||||
newWindowButton->setGeometry(geometry::NewWindowButton);
|
||||
newWindowButton->setCursor(Qt::PointingHandCursor);
|
||||
newWindowButton->setAutoDefault(true);
|
||||
newWindowButton->setAccessibleName("New window configuration");
|
||||
connect(
|
||||
newWindowButton, &QPushButton::released,
|
||||
this, &LauncherWindow::newConfiguration
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user