1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00

Add wine version to profile settings

This commit is contained in:
Joshua Goins 2022-04-09 17:33:37 -04:00
parent 6462895033
commit f3b02c420e
2 changed files with 10 additions and 0 deletions

View file

@ -41,6 +41,7 @@ private:
QLineEdit* winePathLabel; QLineEdit* winePathLabel;
QLineEdit* winePrefixDirectory; QLineEdit* winePrefixDirectory;
QPushButton* configureGamescopeButton; QPushButton* configureGamescopeButton;
QLabel* wineVersionLabel;
QCheckBox* useGamescope, *useEsync, *useGamemode; QCheckBox* useGamescope, *useEsync, *useGamemode;
QCheckBox* enableWatchdog; QCheckBox* enableWatchdog;

View file

@ -264,6 +264,9 @@ SettingsWindow::SettingsWindow(int defaultTab, LauncherWindow& window, LauncherC
this->reloadControls(); this->reloadControls();
}); });
wineVersionLabel = new QLabel();
wineBoxLayout->addRow("Wine Version", wineVersionLabel);
winePrefixDirectory = new QLineEdit(); winePrefixDirectory = new QLineEdit();
winePrefixDirectory->setReadOnly(true); winePrefixDirectory->setReadOnly(true);
wineBoxLayout->addRow("Wine Prefix", winePrefixDirectory); wineBoxLayout->addRow("Wine Prefix", winePrefixDirectory);
@ -450,6 +453,12 @@ void SettingsWindow::reloadControls() {
// wine // wine
#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) #if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
if(!profile.isWineInstalled()) {
wineVersionLabel->setText("Wine is not installed.");
} else {
wineVersionLabel->setText(profile.wineVersion);
}
wineTypeCombo->setCurrentIndex((int)profile.wineType); wineTypeCombo->setCurrentIndex((int)profile.wineType);
selectWineButton->setEnabled(profile.wineType == WineType::Custom); selectWineButton->setEnabled(profile.wineType == WineType::Custom);
winePathLabel->setText(profile.winePath); winePathLabel->setText(profile.winePath);