Skip to content

Commit

Permalink
Swap PyAutoGui for Qt apis to prevent scaling issues (fix #1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Oct 23, 2023
1 parent b4f0e3d commit f60e512
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions elevenclock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
from PySide6.QtGui import *
from PySide6.QtCore import *
from PySide6.QtWidgets import *
import pyautogui
import keyboard
pyautogui.FAILSAFE = False # Prevent pyautogui from blocking the bottom-right corner click.
from external.FramelessWindow import QFramelessDialog
from external.timezones import win_tz

Expand Down
1 change: 0 additions & 1 deletion elevenclock/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ def thirdPartyLicenses():
<li> <b>Frameless Window</b>: <a href="https://github.com/mustafaahci/FramelessWindow/blob/master/LICENSE">The Unlicense</a></li>
<li> <b>Keyboard</b>: <a href="https://github.com/boppreh/keyboard/blob/master/LICENSE.txt">MIT License</a></li>
<li> <b>Psutil</b>: <a href="https://github.com/giampaolo/psutil/blob/master/LICENSE">BSD 3-Clause</a></li>
<li> <b>PyAutoGui</b>: <a href="https://github.com/asweigart/pyautogui/">BSD-3 Clause New</a></li>
<li> <b>PyInstaller</b>: <a href="https://www.pyinstaller.org/license.html">Custom GPL</a></li>
<li> <b>PySide6 (Qt6)</b>: <a href="https://www.qt.io/download-open-source">GPL-v3</a></li>
<li> <b>PyWin32</b>: <a href="https://pypi.org/project/pywin32/">PSF-2.0</a></li>
Expand Down
3 changes: 1 addition & 2 deletions elevenclock/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import win32gui

from external.blurwindow import GlobalBlur, ExtendFrameIntoClientArea
import pyautogui

import globals
from lang.languages import *
Expand Down Expand Up @@ -284,7 +283,7 @@ def kill(self):

def getMousePos() -> QPoint:
try:
p = QPoint(pyautogui.position()[0], pyautogui.position()[1])
p = QCursor.pos()
if p.x() == None:
p.setX(0)
if p.y() == None:
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ PyInstaller==5.9.0
PySide6
keyboard
psutil
pyautogui
pytz
win32mica
winshell
Expand Down

0 comments on commit f60e512

Please sign in to comment.