Skip to content

The only downloader you need. 下载器的集大成者。

fix(tray): 简化 Win10 托盘菜单屏幕边界修正

XiaoYouChR547e9bab6d0b
diff --git a/app/view/shell/tray.py b/app/view/shell/tray.py
index 13fba968..5ac3db2a 100644
--- a/app/view/shell/tray.py
+++ b/app/view/shell/tray.py
@@ -157,13 +157,10 @@ if sys.platform == "win32":
class TrayRoundMenu(RoundMenu):
def showEvent(self, event):
- for action in self._actions:
- item = action.property('item')
- if item:
- self._adjustItemText(item, action)
- self.view.adjustSize()
- self.adjustSize()
- self.adjustPosition()
+ rect = getCurrentScreenGeometry()
+ x = min(self.x(), rect.right() - self.width())
+ y = min(self.y(), rect.bottom() - self.height())
+ self.move(x, y)
super().showEvent(event)
TrayMenu = AcrylicMenu if isGreaterEqualWin11() else TrayRoundMenu