src/eric7/Snapshot/SnapshotRegionGrabber.py

branch
eric7
changeset 9624
b47dfa7a137d
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
equal deleted inserted replaced
9623:9c1f429cb56b 9624:b47dfa7a137d
20 QPixmap, 20 QPixmap,
21 QRegion, 21 QRegion,
22 ) 22 )
23 from PyQt6.QtWidgets import QToolTip, QWidget 23 from PyQt6.QtWidgets import QToolTip, QWidget
24 24
25 from eric7 import Globals 25 from eric7.SystemUtilities import OSUtilities
26 26
27 27
28 def drawRect(painter, rect, outline, fill=None): 28 def drawRect(painter, rect, outline, fill=None):
29 """ 29 """
30 Module function to draw a rectangle with the given parameters. 30 Module function to draw a rectangle with the given parameters.
132 132
133 def __initialize(self): 133 def __initialize(self):
134 """ 134 """
135 Private slot to initialize the rest of the widget. 135 Private slot to initialize the rest of the widget.
136 """ 136 """
137 if Globals.isMacPlatform(): 137 if OSUtilities.isMacPlatform():
138 # macOS variant 138 # macOS variant
139 screen = QGuiApplication.screenAt(QCursor.pos()) 139 screen = QGuiApplication.screenAt(QCursor.pos())
140 geom = screen.geometry() 140 geom = screen.geometry()
141 self.__pixmap = screen.grabWindow( 141 self.__pixmap = screen.grabWindow(
142 0, geom.x(), geom.y(), geom.width(), geom.height() 142 0, geom.x(), geom.y(), geom.width(), geom.height()

eric ide

mercurial