diff --git a/src/plugins/scxmleditor/common/colorthemeview.cpp b/src/plugins/scxmleditor/common/colorthemeview.cpp index 6e7712e92c7..e6d2843d8e3 100644 --- a/src/plugins/scxmleditor/common/colorthemeview.cpp +++ b/src/plugins/scxmleditor/common/colorthemeview.cpp @@ -138,6 +138,8 @@ ColorThemeItem *ColorThemeView::createItem(int index, const QColor &color) const QVector &ColorThemeView::defaultColors() { + // Left with hardcoded values for now + // Can be deleted in the future static const QVector colors = { QColor(0xe0, 0xe0, 0xe0), QColor(0xd3, 0xe4, 0xc3), diff --git a/src/plugins/scxmleditor/common/magnifier.cpp b/src/plugins/scxmleditor/common/magnifier.cpp index ec8ae481f26..ca1a08d5dbb 100644 --- a/src/plugins/scxmleditor/common/magnifier.cpp +++ b/src/plugins/scxmleditor/common/magnifier.cpp @@ -6,6 +6,7 @@ #include "graphicsview.h" #include +#include #include using namespace ScxmlEditor::Common; @@ -36,8 +37,12 @@ void Magnifier::resizeEvent(QResizeEvent *e) m_gradientBrush.setCenter(radius, radius); m_gradientBrush.setFocalPoint(radius, radius); m_gradientBrush.setRadius(radius); - m_gradientBrush.setColorAt(1.0, QColor(255, 255, 255, 0)); - m_gradientBrush.setColorAt(0.0, QColor(0, 0, 0, 255)); + QColor first = parentWidget()->palette().color(QPalette::Window); + first.setAlpha(0); + QColor last = parentWidget()->palette().color(QPalette::WindowText); + last.setAlpha(255); + m_gradientBrush.setColorAt(1.0, first); + m_gradientBrush.setColorAt(0.0, last); int cap = radius * 0.1; m_graphicsView->setMask(QRegion(rect().adjusted(cap, cap, -cap, -cap), QRegion::Ellipse)); diff --git a/src/plugins/scxmleditor/common/mainwidget.cpp b/src/plugins/scxmleditor/common/mainwidget.cpp index 8fda073a336..b180caa5850 100644 --- a/src/plugins/scxmleditor/common/mainwidget.cpp +++ b/src/plugins/scxmleditor/common/mainwidget.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -427,7 +428,7 @@ void MainWidget::exportToImage() if (!filePath.isEmpty()) { const QRectF r = view->scene()->itemsBoundingRect(); QImage image(r.size().toSize(), QImage::Format_ARGB32); - image.fill(QColor(0xef, 0xef, 0xef)); + image.fill(palette().color(QPalette::Window)); QPainter painter(&image); view->scene()->render(&painter, QRectF(), r); diff --git a/src/plugins/scxmleditor/outputpane/errorwidget.cpp b/src/plugins/scxmleditor/outputpane/errorwidget.cpp index e48fc370caa..dab4c60aa59 100644 --- a/src/plugins/scxmleditor/outputpane/errorwidget.cpp +++ b/src/plugins/scxmleditor/outputpane/errorwidget.cpp @@ -19,6 +19,7 @@ #include #include +#include #include using namespace ScxmlEditor::OutputPane; @@ -160,11 +161,11 @@ void ErrorWidget::updateWarnings() QColor ErrorWidget::alertColor() const { if (m_warningModel->count(Warning::ErrorType) > 0) - return QColor(0xff, 0x77, 0x77); + return Utils::creatorColor(Utils::Theme::Token_Notification_Danger); else if (m_warningModel->count(Warning::WarningType)) - return QColor(0xfd, 0x88, 0x21); + return Utils::creatorColor(Utils::Theme::Token_Notification_Alert); else - return QColor(0x29, 0xb6, 0xff); + return Utils::creatorColor(Utils::Theme::Token_Notification_Neutral); } void ErrorWidget::warningCountChanged(int c)