add radius anim to search results

This commit is contained in:
2026-06-30 22:40:08 +02:00
parent 865b5bda53
commit 355106cb2b
+15 -17
View File
@@ -173,7 +173,7 @@ VerticalFadeFlickable {
MaterialIcon { MaterialIcon {
color: DynamicColors.palette.m3primary color: DynamicColors.palette.m3primary
font.pointSize: Appearance.font.size.small font.pointSize: Appearance.font.size.large
text: group.modelData.icon text: group.modelData.icon
} }
@@ -188,7 +188,7 @@ VerticalFadeFlickable {
ColumnLayout { ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 0 spacing: Appearance.spacing.extraSmall / 2
Repeater { Repeater {
model: group.modelData.entries model: group.modelData.entries
@@ -202,25 +202,23 @@ VerticalFadeFlickable {
required property var modelData required property var modelData
Layout.fillWidth: true Layout.fillWidth: true
bottomLeftRadius: isLast ? Appearance.rounding.large : 0 bottomLeftRadius: layer.pressed ? Appearance.rounding.medium : isLast ? Appearance.rounding.large : Appearance.rounding.extraSmall
bottomRightRadius: isLast ? Appearance.rounding.large : 0 bottomRightRadius: layer.pressed ? Appearance.rounding.medium : isLast ? Appearance.rounding.large : Appearance.rounding.extraSmall
color: DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHigh, 2) color: DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHigh, 2)
implicitHeight: { implicitHeight: {
const h = resultLayout.implicitHeight + resultLayout.anchors.margins * 2; const h = resultLayout.implicitHeight + resultLayout.anchors.margins * 2;
return h % 2 === 0 ? h : h + 1; return h % 2 === 0 ? h : h + 1;
} }
topLeftRadius: isFirst ? Appearance.rounding.large : 0 topLeftRadius: layer.pressed ? Appearance.rounding.medium : isFirst ? Appearance.rounding.large : Appearance.rounding.extraSmall
topRightRadius: isFirst ? Appearance.rounding.large : 0 topRightRadius: layer.pressed ? Appearance.rounding.medium : isFirst ? Appearance.rounding.large : Appearance.rounding.extraSmall
CustomRect { RadiusBehavior on bottomLeftRadius {
anchors.bottom: parent.bottom }
anchors.left: parent.left RadiusBehavior on bottomRightRadius {
anchors.leftMargin: Appearance.padding.large }
anchors.right: parent.right RadiusBehavior on topLeftRadius {
anchors.rightMargin: Appearance.padding.large }
color: Qt.alpha(DynamicColors.palette.m3outlineVariant, 0.5) RadiusBehavior on topRightRadius {
implicitHeight: 1
visible: !result.isLast
} }
ColumnLayout { ColumnLayout {
@@ -266,8 +264,8 @@ VerticalFadeFlickable {
} }
StateLayer { StateLayer {
anchors.fill: parent id: layer
radius: 0
z: 1 z: 1
onClicked: { onClicked: {