From ba5de2a3cfdada7e981a3a5ad4e1a6e36ff5c8bd Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 24 Feb 2022 08:19:48 -0500 Subject: [PATCH] Use QLineEdit instead of QLabel for displaying paths --- src/settingswindow.cpp | 12 ++++++------ src/settingswindow.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index 75f26e9..74cfadd 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -72,8 +72,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidg this->core.saveSettings(); }); - currentGameDirectory = new QLabel(); - currentGameDirectory->setWordWrap(true); + currentGameDirectory = new QLineEdit(); + currentGameDirectory->setReadOnly(true); gameBoxLayout->addRow("Game Directory", currentGameDirectory); auto selectDirectoryButton = new QPushButton("Select Game Directory"); @@ -172,8 +172,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidg mainLayout->addWidget(wineBox, 1, 2, 1, 1); - winePathLabel = new QLabel(); - winePathLabel->setWordWrap(true); + winePathLabel = new QLineEdit(); + winePathLabel->setReadOnly(true); wineBoxLayout->addRow("Wine Executable", winePathLabel); wineVersionCombo = new QComboBox(); @@ -205,8 +205,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidg this->reloadControls(); }); - winePrefixDirectory = new QLabel(); - winePrefixDirectory->setWordWrap(true); + winePrefixDirectory = new QLineEdit(); + winePrefixDirectory->setReadOnly(true); wineBoxLayout->addRow("Wine Prefix", winePrefixDirectory); auto selectPrefixButton = new QPushButton("Select Wine Prefix"); diff --git a/src/settingswindow.h b/src/settingswindow.h index 16ce27c..d9b97f6 100644 --- a/src/settingswindow.h +++ b/src/settingswindow.h @@ -29,14 +29,14 @@ private: // game QLineEdit* nameEdit = nullptr; QComboBox* directXCombo = nullptr; - QLabel* currentGameDirectory = nullptr; + QLineEdit* currentGameDirectory = nullptr; QLabel* expansionVersionLabel = nullptr; // wine QComboBox* wineVersionCombo; QPushButton* selectWineButton; - QLabel* winePathLabel; - QLabel* winePrefixDirectory; + QLineEdit* winePathLabel; + QLineEdit* winePrefixDirectory; QCheckBox* useGamescope, *useEsync, *useGamemode; QCheckBox* enableWatchdog;