For the "Compact" view; show hovered background

This commit is contained in:
Tom Z
2021-08-19 14:58:53 +02:00
committed by Tobias Fella
parent 8d59e2ba67
commit c39e46a1f0

View File

@@ -206,8 +206,16 @@ QQC2.ItemDelegate {
} }
} }
background: Kirigami.ShadowedRectangle { background: Item {
Rectangle {
visible: messageDelegate.hovered
color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15)
radius: Kirigami.Units.smallSpacing
anchors.fill: parent
}
Kirigami.ShadowedRectangle {
visible: cardBackground && !Config.compactLayout visible: cardBackground && !Config.compactLayout
anchors.fill: parent
color: { color: {
if (model.author.isLocalUser) { if (model.author.isLocalUser) {
return Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15) return Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15)
@@ -224,6 +232,7 @@ QQC2.ItemDelegate {
border.width: Kirigami.Units.devicePixelRatio border.width: Kirigami.Units.devicePixelRatio
} }
} }
}
Loader { Loader {
id: loader id: loader