12 |
12 |
13 from PyQt6.QtCore import pyqtSignal, QRectF, QSize, QSizeF, Qt |
13 from PyQt6.QtCore import pyqtSignal, QRectF, QSize, QSizeF, Qt |
14 from PyQt6.QtGui import QBrush, QPainter, QPixmap, QFont, QColor |
14 from PyQt6.QtGui import QBrush, QPainter, QPixmap, QFont, QColor |
15 from PyQt6.QtWidgets import QGraphicsView |
15 from PyQt6.QtWidgets import QGraphicsView |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.EricApplication import ericApp |
18 |
18 |
19 import Preferences |
19 import Preferences |
20 |
20 |
21 |
21 |
22 class EricGraphicsView(QGraphicsView): |
22 class EricGraphicsView(QGraphicsView): |
82 @return tuple containing the foreground and background colors |
82 @return tuple containing the foreground and background colors |
83 @rtype tuple of (QColor, QColor) |
83 @rtype tuple of (QColor, QColor) |
84 """ |
84 """ |
85 drawingMode = Preferences.getGraphics("DrawingMode") |
85 drawingMode = Preferences.getGraphics("DrawingMode") |
86 if drawingMode == "automatic": |
86 if drawingMode == "automatic": |
87 if e5App().usesDarkPalette(): |
87 if ericApp().usesDarkPalette(): |
88 drawingMode = "white_black" |
88 drawingMode = "white_black" |
89 else: |
89 else: |
90 drawingMode = "black_white" |
90 drawingMode = "black_white" |
91 |
91 |
92 if drawingMode == "white_black": |
92 if drawingMode == "white_black": |