This commit is contained in:
恍兮惚兮 2024-08-14 11:56:17 +08:00
parent e6fd54e233
commit 00b0385401
3 changed files with 6 additions and 4 deletions

View File

@ -171,9 +171,9 @@ class voiceselect(LDialog):
self.setWindowTitle("选择声音")
self.setWindowFlags(
self.windowFlags()
& ~Qt.WindowContextHelpButtonHint
& ~Qt.WindowType.WindowContextHelpButtonHint
& ~Qt.WindowType.WindowCloseButtonHint
| Qt.WindowStaysOnTopHint
| Qt.WindowType.WindowStaysOnTopHint
)
_layout = LFormLayout(self)

View File

@ -849,6 +849,8 @@ class TranslatorWindow(resizableframeless):
# icon.addPixmap(QPixmap('./files/luna.png'), QIcon.Normal, QIcon.On)
self.setWindowIcon(icon)
self.firstshow = True
if globalconfig['keepontop']:
self.setWindowFlag(Qt.WindowType.WindowStaysOnTopHint)
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
self.setAttribute(Qt.WidgetAttribute.WA_ShowWithoutActivating, True)
self.setWindowTitle("LunaTranslator")

View File

@ -769,9 +769,9 @@ class Prompt_dialog(LDialog):
super().__init__(parent)
self.setWindowFlags(
self.windowFlags()
& ~Qt.WindowContextHelpButtonHint
& ~Qt.WindowType.WindowContextHelpButtonHint
& ~Qt.WindowType.WindowCloseButtonHint
| Qt.WindowStaysOnTopHint
| Qt.WindowType.WindowStaysOnTopHint
)
self.setWindowTitle(title)
self.setWindowIcon(qtawesome.icon("fa-question"))