From 8e9cf9604ffa7853e30b653128f4ca849894f2ef Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 14 Mar 2024 17:40:54 +0100 Subject: [PATCH] QmlDesigner: Fix landing page theming The QmlDesigner landing page appears if a *.ui.qml document is open, and user selects the "design" mode. Between QtC 12 and 13, the landing page broke (unnoticed) due to the removal of the "Welcome_*" theme colors. This change lets the Landing page use the new color tokens. A few fixes in the PushButton component were needed. Fixes: QTCREATORBUG-30547 Change-Id: I93319665bb283fba7f7a8892b671aaeb11479c7e Reviewed-by: Eike Ziller --- .../landingpage/content/PushButton.ui.qml | 4 ++-- .../LandingPage/+QDS_theming/Colors.qml | 18 +++++++++--------- .../landingpage/imports/LandingPage/Colors.qml | 18 +++++++++--------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/share/qtcreator/qmldesigner/landingpage/content/PushButton.ui.qml b/share/qtcreator/qmldesigner/landingpage/content/PushButton.ui.qml index c75fad53e7e..d888733cb5f 100644 --- a/share/qtcreator/qmldesigner/landingpage/content/PushButton.ui.qml +++ b/share/qtcreator/qmldesigner/landingpage/content/PushButton.ui.qml @@ -23,7 +23,7 @@ Button { color: Theme.Colors.backgroundPrimary implicitWidth: 100 implicitHeight: 35 - border.color: Theme.Colors.foregroundSecondary + border.color: Theme.Colors.foregroundPrimary anchors.fill: parent } @@ -80,7 +80,7 @@ Button { PropertyChanges { target: buttonBackground color: Theme.Colors.backgroundPrimary - border.color: Theme.Colors.disabledLink + border.color: Theme.Colors.foregroundSecondary } PropertyChanges { target: textItem diff --git a/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/+QDS_theming/Colors.qml b/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/+QDS_theming/Colors.qml index 0b100765004..37a1c9878e5 100644 --- a/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/+QDS_theming/Colors.qml +++ b/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/+QDS_theming/Colors.qml @@ -5,13 +5,13 @@ pragma Singleton import QtQuick 2.15 QtObject { - readonly property color text: "#ffe7e7e7" - readonly property color foregroundPrimary: "#ffa3a3a3" - readonly property color foregroundSecondary: "#ff808080" - readonly property color backgroundPrimary: "#ff333333" - readonly property color backgroundSecondary: "#ff232323" - readonly property color hover: "#ff404040" - readonly property color accent: "#ff57d658" - readonly property color link: "#ff67e668" - readonly property color disabledLink: "#7fffffff" + readonly property color text: "#fff8f8f8" // Token_Text_Default + readonly property color foregroundPrimary: "#ff474747" // Token_Foreground_Default + readonly property color foregroundSecondary: "#ff353535" // Token_Foreground_Muted + readonly property color backgroundPrimary: "#ff1f1f1f" // Token_Background_Default + readonly property color backgroundSecondary: "#ff262626" // Token_Background_Muted + readonly property color hover: "#ff2e2e2e" // Token_Background_Subtle + readonly property color accent: "#ff1f9b5d" // Token_Accent_Default + readonly property color link: "#ff23b26a" // Token_Text_Accent + readonly property color disabledLink: "#ff595959" // Token_Text_Subtle } diff --git a/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/Colors.qml b/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/Colors.qml index 3dd1911f1ff..58ef8f030c7 100644 --- a/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/Colors.qml +++ b/share/qtcreator/qmldesigner/landingpage/imports/LandingPage/Colors.qml @@ -6,13 +6,13 @@ import QtQuick 2.15 import LandingPageTheme QtObject { - readonly property color text: Theme.color(Theme.Welcome_TextColor) - readonly property color foregroundPrimary: Theme.color(Theme.Welcome_ForegroundPrimaryColor) - readonly property color foregroundSecondary: Theme.color(Theme.Welcome_ForegroundSecondaryColor) - readonly property color backgroundPrimary: Theme.color(Theme.Welcome_BackgroundPrimaryColor) - readonly property color backgroundSecondary: Theme.color(Theme.Welcome_BackgroundSecondaryColor) - readonly property color hover: Theme.color(Theme.Welcome_HoverColor) - readonly property color accent: Theme.color(Theme.Welcome_AccentColor) - readonly property color link: Theme.color(Theme.Welcome_LinkColor) - readonly property color disabledLink: Theme.color(Theme.Welcome_DisabledLinkColor) + readonly property color text: Theme.color(Theme.Token_Text_Default) + readonly property color foregroundPrimary: Theme.color(Theme.Token_Foreground_Default) + readonly property color foregroundSecondary: Theme.color(Theme.Token_Foreground_Muted) + readonly property color backgroundPrimary: Theme.color(Theme.Token_Background_Default) + readonly property color backgroundSecondary: Theme.color(Theme.Token_Background_Muted) + readonly property color hover: Theme.color(Theme.Token_Background_Subtle) + readonly property color accent: Theme.color(Theme.Token_Accent_Default) + readonly property color link: Theme.color(Theme.Token_Text_Accent) + readonly property color disabledLink: Theme.color(Theme.Token_Text_Subtle) }