mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
[themes] Fix the processing modeler's rendering on dark backgrounds
This commit is contained in:
parent
2e36fd603e
commit
6957009f8b
@ -50,8 +50,8 @@ from qgis.core import (QgsProcessingModelAlgorithm,
|
|||||||
QgsProcessingModelChildAlgorithm,
|
QgsProcessingModelChildAlgorithm,
|
||||||
QgsProcessingModelParameter)
|
QgsProcessingModelParameter)
|
||||||
from qgis.PyQt.QtCore import Qt, QPointF
|
from qgis.PyQt.QtCore import Qt, QPointF
|
||||||
from qgis.PyQt.QtWidgets import QGraphicsPathItem, QGraphicsItem
|
from qgis.PyQt.QtWidgets import QApplication, QGraphicsPathItem, QGraphicsItem
|
||||||
from qgis.PyQt.QtGui import QPen, QPainterPath, QPolygonF, QPainter
|
from qgis.PyQt.QtGui import QPen, QPainterPath, QPolygonF, QPainter, QPalette
|
||||||
from processing.modeler.ModelerGraphicItem import ModelerGraphicItem
|
from processing.modeler.ModelerGraphicItem import ModelerGraphicItem
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class ModelerArrowItem(QGraphicsPathItem):
|
|||||||
self.endItem = endItem
|
self.endItem = endItem
|
||||||
self.endPoints = []
|
self.endPoints = []
|
||||||
self.setFlag(QGraphicsItem.ItemIsSelectable, False)
|
self.setFlag(QGraphicsItem.ItemIsSelectable, False)
|
||||||
self.myColor = Qt.gray
|
self.myColor = QApplication.palette().color(QPalette.WindowText)
|
||||||
self.setPen(QPen(self.myColor, 1, Qt.SolidLine,
|
self.setPen(QPen(self.myColor, 1, Qt.SolidLine,
|
||||||
Qt.RoundCap, Qt.RoundJoin))
|
Qt.RoundCap, Qt.RoundJoin))
|
||||||
self.setZValue(0)
|
self.setZValue(0)
|
||||||
|
@ -30,8 +30,8 @@ import os
|
|||||||
import math
|
import math
|
||||||
|
|
||||||
from qgis.PyQt.QtCore import Qt, QPointF, QRectF
|
from qgis.PyQt.QtCore import Qt, QPointF, QRectF
|
||||||
from qgis.PyQt.QtGui import QFont, QFontMetricsF, QPen, QBrush, QColor, QPolygonF, QPicture, QPainter
|
from qgis.PyQt.QtGui import QFont, QFontMetricsF, QPen, QBrush, QColor, QPolygonF, QPicture, QPainter, QPalette
|
||||||
from qgis.PyQt.QtWidgets import QGraphicsItem, QMessageBox, QMenu
|
from qgis.PyQt.QtWidgets import QApplication, QGraphicsItem, QMessageBox, QMenu
|
||||||
from qgis.PyQt.QtSvg import QSvgRenderer
|
from qgis.PyQt.QtSvg import QSvgRenderer
|
||||||
from qgis.core import (QgsProcessingParameterDefinition,
|
from qgis.core import (QgsProcessingParameterDefinition,
|
||||||
QgsProcessingModelParameter,
|
QgsProcessingModelParameter,
|
||||||
@ -328,7 +328,7 @@ class ModelerGraphicItem(QGraphicsItem):
|
|||||||
h = fm.ascent()
|
h = fm.ascent()
|
||||||
pt = QPointF(-ModelerGraphicItem.BOX_WIDTH / 2 + 25, ModelerGraphicItem.BOX_HEIGHT / 2.0 - h + 1)
|
pt = QPointF(-ModelerGraphicItem.BOX_WIDTH / 2 + 25, ModelerGraphicItem.BOX_HEIGHT / 2.0 - h + 1)
|
||||||
painter.drawText(pt, text)
|
painter.drawText(pt, text)
|
||||||
painter.setPen(QPen(Qt.black))
|
painter.setPen(QPen(QApplication.palette().color(QPalette.WindowText)))
|
||||||
if isinstance(self.element, QgsProcessingModelChildAlgorithm):
|
if isinstance(self.element, QgsProcessingModelChildAlgorithm):
|
||||||
h = -(fm.height() * 1.2)
|
h = -(fm.height() * 1.2)
|
||||||
h = h - ModelerGraphicItem.BOX_HEIGHT / 2.0 + 5
|
h = h - ModelerGraphicItem.BOX_HEIGHT / 2.0 + 5
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
0:#0e0e0e
|
||||||
2:#373737
|
2:#373737
|
||||||
5:#373737
|
5:#373737
|
||||||
9:#727272
|
9:#727272
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
0:#aaaaaa
|
||||||
2:#535353
|
2:#535353
|
||||||
5:#222222
|
5:#222222
|
||||||
9:#535353
|
9:#535353
|
||||||
|
Loading…
x
Reference in New Issue
Block a user