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 <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2024-03-14 17:40:54 +01:00
parent 6a78272ac8
commit 8e9cf9604f
3 changed files with 20 additions and 20 deletions

View File

@@ -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

View File

@@ -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
}

View File

@@ -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)
}