SchemeDownloader: make schemes look more similar to ColorSchemeTab ones

This commit is contained in:
Ly-sec
2025-11-19 13:42:29 +01:00
parent 64f5d99a48
commit 17810d1d2f
@@ -810,13 +810,18 @@ Popup {
model: availableSchemes
Rectangle {
id: schemeItem
Layout.fillWidth: true
Layout.preferredHeight: 50 * Style.uiScaleRatio
radius: Style.radiusS
property string schemeName: modelData.name
color: root.getSchemeColor(schemeName, "mSurfaceVariant")
border.width: Style.borderS
border.color: Color.mOutline
color: root.getSchemeColor(schemeName, "mSurface")
border.width: Style.borderL
border.color: hoverHandler.hovered ? root.getSchemeColor(schemeName, "mPrimary") : Color.mOutline
HoverHandler {
id: hoverHandler
}
Behavior on color {
ColorAnimation {
@@ -825,6 +830,13 @@ Popup {
}
}
Behavior on border.color {
ColorAnimation {
duration: Style.animationFast
easing.type: Easing.InOutCubic
}
}
Component.onCompleted: {
if (root.visible && !root.schemeColorsCache[schemeName]) {
root.fetchSchemeColors(modelData);
@@ -847,17 +859,10 @@ Popup {
NText {
text: schemeRow.schemeName
pointSize: Style.fontSizeS
color: root.getSchemeColor(schemeRow.schemeName, "mOnSurface")
color: Color.mOnSurface
Layout.fillWidth: true
elide: Text.ElideRight
Layout.alignment: Qt.AlignVCenter
Behavior on color {
ColorAnimation {
duration: Style.animationFast
easing.type: Easing.InOutCubic
}
}
}
// Color swatches