From 7cff8ae9985988367a856a80281cfc25e5255ea8 Mon Sep 17 00:00:00 2001 From: GengGode Date: Sun, 26 Sep 2021 01:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E6=A0=B7=E5=BC=8F=20=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=90=AF=E5=8A=A8=E5=99=A8=E6=89=80=E5=9C=A8?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9=E4=B8=BA=E9=80=89=E6=8B=A9=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=99=A8=E5=BA=94=E7=94=A8=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GenshinImpactNaturalLaw/QtWidgetsSetting.cpp | 5 ++- GenshinImpactNaturalLaw/QtWidgetsSetting.ui | 32 ++++++++++++++++++-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/GenshinImpactNaturalLaw/QtWidgetsSetting.cpp b/GenshinImpactNaturalLaw/QtWidgetsSetting.cpp index 3f9790f..bc9f51e 100644 --- a/GenshinImpactNaturalLaw/QtWidgetsSetting.cpp +++ b/GenshinImpactNaturalLaw/QtWidgetsSetting.cpp @@ -402,10 +402,13 @@ void QtWidgetsSetting::CheckOptions_CheckGameLauncher() { FileDialogPath = setting->launcher_install_path; } - QString GameLauncherPath = QFileDialog::getExistingDirectory(this, tr("Str_SelectGILauncherPath")/*"选择原神启动器所在目录"*/, FileDialogPath, QFileDialog::ShowDirsOnly); + QString GameLauncherPath = QFileDialog::getOpenFileName(this, tr("Str_SelectGILauncherPath")/*"选择原神所在目录"*/, FileDialogPath, tr("Str_ApplicationProgram") + " (*.exe);;"/* "应用程序 (*.exe);;"*/); + + //QString GameLauncherPath = QFileDialog::getExistingDirectory(this, tr("Str_SelectGILauncherPath")/*"选择原神启动器所在目录"*/, FileDialogPath, QFileDialog::ShowDirsOnly); if (!GameLauncherPath.isEmpty()) { + GameLauncherPath = GameLauncherPath.section("/", 0, -2); QFileInfo file(GameLauncherPath+"/launcher.exe"); if (file.exists() == false) { diff --git a/GenshinImpactNaturalLaw/QtWidgetsSetting.ui b/GenshinImpactNaturalLaw/QtWidgetsSetting.ui index 08f0b6b..9930d2c 100644 --- a/GenshinImpactNaturalLaw/QtWidgetsSetting.ui +++ b/GenshinImpactNaturalLaw/QtWidgetsSetting.ui @@ -501,7 +501,7 @@ height: 0px; 0 - -1127 + -227 561 1465 @@ -875,6 +875,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); } @@ -950,7 +954,7 @@ border-radius: 0px; - false + true @@ -984,6 +988,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); } @@ -1107,6 +1115,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); } @@ -1190,6 +1202,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); } @@ -1316,6 +1332,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); } @@ -1403,6 +1423,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); } @@ -1490,6 +1514,10 @@ background-color:rgb(251, 248, 239); } QPushButton:pressed { background-color:rgb(236, 233, 224); +} + +QPushButton:!enabled { +background-color:rgb(246, 245, 243); }