forked from qt-creator/qt-creator
SCXMLEditor: Set background color according to theme
Task-number: QTCREATORBUG-29701 Change-Id: Id0628f708849ed87e6e8ab942732f0ad6ffe177d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
@@ -31,10 +33,11 @@ GraphicsView::GraphicsView(QWidget *parent)
|
|||||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||||
setDragMode(RubberBandDrag);
|
setDragMode(RubberBandDrag);
|
||||||
setRubberBandSelectionMode(Qt::ContainsItemShape);
|
setRubberBandSelectionMode(Qt::ContainsItemShape);
|
||||||
setBackgroundBrush(QBrush(QColor(0xef, 0xef, 0xef)));
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
setFrameShape(QFrame::NoFrame);
|
setFrameShape(QFrame::NoFrame);
|
||||||
|
|
||||||
|
setPalette(Utils::creatorTheme()->palette());
|
||||||
|
|
||||||
connect(horizontalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::updateView);
|
connect(horizontalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::updateView);
|
||||||
connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::updateView);
|
connect(verticalScrollBar(), &QScrollBar::valueChanged, this, &GraphicsView::updateView);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user