cleanup(NScrollText): remove unused imports, gate layer on overflow

This commit is contained in:
Lemmy
2026-03-28 14:06:24 -04:00
parent ffb61d8fc4
commit a5fc309880
3 changed files with 3 additions and 5 deletions
-1
View File
@@ -1,6 +1,5 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
-1
View File
@@ -1,6 +1,5 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
import QtQuick.Layouts
import Quickshell
import qs.Commons
+3 -3
View File
@@ -40,7 +40,7 @@ Item {
property real scrollCycleDuration: Math.max(4000, root.text.length * 120)
property real resettingDuration: 300
// Fade controls
// Fade controls (fadeExtent: 0.00.5, fraction of width that fades)
property real fadeExtent: 0.1
property real fadeCornerRadius: 0
property bool fadeRoundLeftCorners: true
@@ -56,7 +56,7 @@ Item {
implicitWidth: alwaysMaxWidth ? maxWidth : Math.min(maxWidth, contentWidth)
implicitHeight: titleText.height
layer.enabled: true
layer.enabled: contentWidth > maxWidth
layer.effect: MultiEffect {
maskEnabled: true
maskThresholdMin: 0.5
@@ -213,6 +213,6 @@ Item {
}
layer.enabled: true
layer.smooth: true
opacity: 0 // Great for debugging! Will show the white masks
opacity: 0
}
}