1
1
mirror of https://github.com/KenanZhu/AutoLibrary.git synced 2026-06-18 07:23:03 +08:00

fix(gui.ALConfigWidget): allow earlier selection of next day and fix dialog title on config load

previous time that you can select the next day is 19:00, this may be
tensive, because the time rested to modify the reserve date is limited.
So in current commit, we change this into 18:00.
This commit is contained in:
2025-11-04 19:30:53 +08:00
parent bdc700d3da
commit c67a7e3773
3 changed files with 48 additions and 3 deletions
+2 -2
View File
@@ -268,7 +268,7 @@ class ALConfigWidget(QWidget, Ui_ALConfigWidget):
self.DateEdit.setDate(QDate.currentDate())
self.DateEdit.setMinimumDate(QDate.currentDate())
self.DateEdit.setMaximumDate(QDate.currentDate())
if QTime.currentTime() > QTime(19, 0, 0) and QTime.currentTime() < QTime(23, 0, 0):
if QTime.currentTime() > QTime(18, 0, 0) and QTime.currentTime() < QTime(23, 0, 0):
self.DateEdit.setMaximumDate(QDate.currentDate().addDays(1))
self.BeginTimeEdit.setTime(QTime.currentTime())
self.PreferEarlyBeginTimeCheckBox.setChecked(False)
@@ -479,7 +479,7 @@ class ALConfigWidget(QWidget, Ui_ALConfigWidget):
if not config_path:
config_path = QFileDialog.getOpenFileName(
self,
"选择配置文件 - AutoLibrary",
"从现有配置文件中加载 - AutoLibrary",
f"{QDir.toNativeSeparators(QDir.currentPath())}",
"JSON 文件 (*.json);;所有文件 (*)"
)[0]