修复气泡底色问题
This commit is contained in:
@@ -111,6 +111,17 @@ def main():
|
||||
ball.clicked.connect(lambda: panel.show_near(ball.pos(), BALL_SIZE))
|
||||
ball.right_clicked.connect(lambda pos: panel.tray.contextMenu().exec(pos))
|
||||
|
||||
# 全局快捷键 Alt+` 唤醒/隐藏主界面
|
||||
from PyQt6.QtGui import QShortcut, QKeySequence
|
||||
_shortcut = QShortcut(QKeySequence("Alt+`"), panel)
|
||||
_shortcut.setContext(Qt.ShortcutContext.ApplicationShortcut)
|
||||
def _toggle_panel():
|
||||
if panel.isVisible():
|
||||
panel.minimize_to_ball()
|
||||
else:
|
||||
panel.show_near(ball.pos(), BALL_SIZE)
|
||||
_shortcut.activated.connect(_toggle_panel)
|
||||
|
||||
has_saved = bool(database.get_setting("panel_x", ""))
|
||||
if has_saved:
|
||||
panel.setWindowOpacity(0)
|
||||
|
||||
Reference in New Issue
Block a user