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() |