From 143aa43ec254064674f3e12d804d4597ee7a6ab1 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Mon, 16 Sep 2024 15:04:05 +0200 Subject: [PATCH] SCXMLEditor: Set background color according to theme Task-number: QTCREATORBUG-29701 Change-Id: Id0628f708849ed87e6e8ab942732f0ad6ffe177d Reviewed-by: Alessandro Portale --- src/plugins/scxmleditor/common/graphicsview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/scxmleditor/common/graphicsview.cpp b/src/plugins/scxmleditor/common/graphicsview.cpp index cd8bfd4bd17..e0ba77bcbdf 100644 --- a/src/plugins/scxmleditor/common/graphicsview.cpp +++ b/src/plugins/scxmleditor/common/graphicsview.cpp @@ -13,6 +13,8 @@ #include +#include + #include #include #include @@ -31,10 +33,11 @@ GraphicsView::GraphicsView(QWidget *parent) setViewportUpdateMode(QGraphicsView::FullViewportUpdate); setDragMode(RubberBandDrag); setRubberBandSelectionMode(Qt::ContainsItemShape); - setBackgroundBrush(QBrush(QColor(0xef, 0xef, 0xef))); setAcceptDrops(true); setFrameShape(QFrame::NoFrame); + setPalette(Utils::creatorTheme()->palette()); + connect(horizontalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::updateView); connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::updateView); }