Skip to content

Commit

Permalink
add custom theme & add some settings & optimize auto turn on
Browse files Browse the repository at this point in the history
  • Loading branch information
ElluIFX committed Nov 24, 2024
1 parent ad2dcf6 commit 9e8aef7
Show file tree
Hide file tree
Showing 10 changed files with 695 additions and 354 deletions.
Binary file modified gui_source/en_US.qm
Binary file not shown.
545 changes: 304 additions & 241 deletions gui_source/en_US.ts

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions gui_source/mdp_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def __init__(
message,
question=False,
additional_actions: List[Tuple[str, Callable[[], bool]]] = [],
override_key_strs: List[str] = [],
) -> None:
super().__init__(parent)
self.setWindowTitle(title)
Expand Down Expand Up @@ -113,17 +114,23 @@ def __init__(
self.horizontalLayout.setSpacing(8)
layout.addLayout(self.horizontalLayout)
if not question:
self.okButton = QtWidgets.QPushButton(self.tr("确定"), self)
self.okButton = QtWidgets.QPushButton(
self.tr("确定") if not override_key_strs else override_key_strs[0], self
)
self.okButton.setFont(global_font)
self.okButton.clicked.connect(self.close)
self.horizontalLayout.addWidget(self.okButton)
else:
self.okButton = QtWidgets.QPushButton(self.tr("是"), self)
self.okButton = QtWidgets.QPushButton(
self.tr("是") if not override_key_strs else override_key_strs[0], self
)
self.okButton.setFont(global_font)
self.okButton.clicked.connect(self.accept)
self.horizontalLayout.addWidget(self.okButton)

self.cancelButton = QtWidgets.QPushButton(self.tr("否"), self)
self.cancelButton = QtWidgets.QPushButton(
self.tr("否") if not override_key_strs else override_key_strs[1], self
)
self.cancelButton.setFont(global_font)
self.cancelButton.clicked.connect(self.reject)
self.horizontalLayout.addWidget(self.cancelButton)
Expand Down
Loading

0 comments on commit 9e8aef7

Please sign in to comment.