diff --git a/share/qtcreator/themes/dark.creatortheme b/share/qtcreator/themes/dark.creatortheme index 546827ee1d2..70c73b12d8d 100644 --- a/share/qtcreator/themes/dark.creatortheme +++ b/share/qtcreator/themes/dark.creatortheme @@ -200,6 +200,7 @@ PaletteWindowTextDisabled=textDisabled PaletteBaseDisabled=backgroundColorDisabled PaletteTextDisabled=textDisabled +QmlDesigner_BackgroundColor=ff3c3e40 QmlDesigner_HighlightColor=ff46a2da [Flags] diff --git a/share/qtcreator/themes/default.creatortheme b/share/qtcreator/themes/default.creatortheme index ceb0f39f439..191a2c14e28 100644 --- a/share/qtcreator/themes/default.creatortheme +++ b/share/qtcreator/themes/default.creatortheme @@ -171,6 +171,7 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffa500 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffc6c132 +QmlDesigner_BackgroundColor=ff4c4e50 QmlDesigner_HighlightColor=ff46a2da [Flags] diff --git a/share/qtcreator/themes/flat-dark.creatortheme b/share/qtcreator/themes/flat-dark.creatortheme index eeee986a21c..87a9a21a250 100644 --- a/share/qtcreator/themes/flat-dark.creatortheme +++ b/share/qtcreator/themes/flat-dark.creatortheme @@ -185,6 +185,7 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffff40 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffceff40 +QmlDesigner_BackgroundColor=ff4c4e50 QmlDesigner_HighlightColor=ff3f91c4 PaletteWindow=normalBackground diff --git a/share/qtcreator/themes/flat-light.creatortheme b/share/qtcreator/themes/flat-light.creatortheme index 65920b5780b..1749565821c 100644 --- a/share/qtcreator/themes/flat-light.creatortheme +++ b/share/qtcreator/themes/flat-light.creatortheme @@ -182,6 +182,7 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffa500 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffc6c132 +QmlDesigner_BackgroundColor=fff8f8f8 QmlDesigner_HighlightColor=ff46a2da [Flags] diff --git a/share/qtcreator/themes/flat.creatortheme b/share/qtcreator/themes/flat.creatortheme index 51fd6df5aa4..47c93b4ad40 100644 --- a/share/qtcreator/themes/flat.creatortheme +++ b/share/qtcreator/themes/flat.creatortheme @@ -181,6 +181,7 @@ ProjectExplorer_TaskWarn_TextMarkColor=ffffa500 ClangCodeModel_Error_TextMarkColor=ffff882f ClangCodeModel_Warning_TextMarkColor=ffc6c132 +QmlDesigner_BackgroundColor=ff4c4e50 QmlDesigner_HighlightColor=ff46a2da [Flags] diff --git a/src/libs/utils/theme/theme.h b/src/libs/utils/theme/theme.h index dd2eac9a0d2..188ed0cc9ee 100644 --- a/src/libs/utils/theme/theme.h +++ b/src/libs/utils/theme/theme.h @@ -282,6 +282,7 @@ public: ClangCodeModel_Warning_TextMarkColor, /* QmlDesigner */ + QmlDesigner_BackgroundColor, QmlDesigner_HighlightColor }; diff --git a/src/plugins/qmldesigner/components/componentcore/theming.cpp b/src/plugins/qmldesigner/components/componentcore/theming.cpp index c2ba9b37d9c..d1429ff45bc 100644 --- a/src/plugins/qmldesigner/components/componentcore/theming.cpp +++ b/src/plugins/qmldesigner/components/componentcore/theming.cpp @@ -33,13 +33,6 @@ namespace QmlDesigner { -QColor midtone(const QColor &a, const QColor &b) -{ - QColor alphaB = b; - alphaB.setAlpha(128); - return Utils::StyleHelper::alphaBlendedColors(a ,alphaB); -} - void Theming::insertTheme(QQmlPropertyMap *map) { const QVariantHash creatorTheme = Utils::creatorTheme()->values(); @@ -47,6 +40,7 @@ void Theming::insertTheme(QQmlPropertyMap *map) map->insert(it.key(), it.value()); /* Define QmlDesigner colors and remove alpha channels */ + const QColor backgroundColor = Utils::creatorTheme()->color(Utils::Theme::QmlDesigner_BackgroundColor); const QColor panelStatusBarBackgroundColor = Utils::creatorTheme()->color(Utils::Theme::PanelStatusBarBackgroundColor); const QColor fancyToolButtonSelectedColor = Utils::creatorTheme()->color(Utils::Theme::FancyToolButtonSelectedColor); const QColor darkerBackground = Utils::StyleHelper::alphaBlendedColors(panelStatusBarBackgroundColor, fancyToolButtonSelectedColor); @@ -65,7 +59,7 @@ void Theming::insertTheme(QQmlPropertyMap *map) } map->insert("QmlDesignerBackgroundColorDarker", darkerBackground); - map->insert("QmlDesignerBackgroundColorDarkAlternate", midtone(panelStatusBarBackgroundColor, buttonColor)); + map->insert("QmlDesignerBackgroundColorDarkAlternate", backgroundColor); map->insert("QmlDesignerTabLight", tabLight); map->insert("QmlDesignerTabDark", tabDark); map->insert("QmlDesignerButtonColor", buttonColor);