add scroll edge fade to some scrolled windows

This commit is contained in:
end-4
2025-09-23 11:14:34 +02:00
parent 2b47083c12
commit fc9bda9f7f
8 changed files with 178 additions and 93 deletions
@@ -308,6 +308,20 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
Item { // Messages
Layout.fillWidth: true
Layout.fillHeight: true
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: swipeView.width
height: swipeView.height
radius: Appearance.rounding.small
}
}
ScrollEdgeFade {
target: messageListView
vertical: true
}
StyledListView { // Message list
id: messageListView
anchors.fill: parent
@@ -318,8 +332,8 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
mouseScrollFactor: Config.options.interactions.scrolling.mouseScrollFactor * 1.4
property int lastResponseLength: 0
property bool shouldAutoScroll: true
onContentYChanged: shouldAutoScroll = atYEnd
onContentHeightChanged: {
if (shouldAutoScroll) positionViewAtEnd();
@@ -328,16 +342,6 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\)
if (shouldAutoScroll) positionViewAtEnd();
}
clip: true
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: swipeView.width
height: swipeView.height
radius: Appearance.rounding.small
}
}
add: null // Prevent function calls from being janky
model: ScriptModel {