mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
NScrollText: disable gradient if capsule has transparency
This commit is contained in:
@@ -45,6 +45,8 @@ Item {
|
||||
property color gradientColor: Color.mSurfaceVariant
|
||||
property real cornerRadius: 0
|
||||
|
||||
readonly property bool gradientsEnabled: root.showGradients && Settings.data.bar.capsuleOpacity >= 1.0
|
||||
|
||||
readonly property real contentWidth: {
|
||||
if (!titleText.item)
|
||||
return 0;
|
||||
@@ -184,7 +186,7 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
width: root.gradientWidth
|
||||
z: 2
|
||||
visible: root.showGradients && root.contentWidth > root.maxWidth
|
||||
visible: root.gradientsEnabled && root.contentWidth > root.maxWidth
|
||||
radius: root.cornerRadius
|
||||
opacity: scrollContainer.x < -1 ? 1 : 0
|
||||
gradient: Gradient {
|
||||
@@ -213,7 +215,7 @@ Item {
|
||||
anchors.bottom: parent.bottom
|
||||
width: root.gradientWidth
|
||||
z: 2
|
||||
visible: root.showGradients && root.contentWidth > root.maxWidth
|
||||
visible: root.gradientsEnabled && root.contentWidth > root.maxWidth
|
||||
radius: root.cornerRadius
|
||||
opacity: 1 // Always show if overflowing as it loops
|
||||
gradient: Gradient {
|
||||
|
||||
Reference in New Issue
Block a user