From fe4e72eab3170c5f888b14251d15e51b2a5adf9c Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 3 Aug 2025 18:59:05 +1000 Subject: internal: better shadow --- widgets/ExtraIndicator.qml | 16 ++++++++-------- widgets/VerticalSlider.qml | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'widgets') diff --git a/widgets/ExtraIndicator.qml b/widgets/ExtraIndicator.qml index 448af23..fd6f6ee 100644 --- a/widgets/ExtraIndicator.qml +++ b/widgets/ExtraIndicator.qml @@ -1,7 +1,6 @@ import qs.services import qs.config import QtQuick -import QtQuick.Effects StyledRect { required property int extra @@ -15,16 +14,17 @@ StyledRect { implicitWidth: count.implicitWidth + Appearance.padding.normal * 2 implicitHeight: count.implicitHeight + Appearance.padding.small * 2 - layer.enabled: opacity > 0 - layer.effect: MultiEffect { - shadowEnabled: true - blurMax: 10 - shadowColor: Colours.palette.m3shadow - } - opacity: extra > 0 ? 1 : 0 scale: extra > 0 ? 1 : 0.5 + Elevation { + anchors.fill: parent + radius: parent.radius + opacity: parent.opacity + z: -1 + level: 2 + } + StyledText { id: count diff --git a/widgets/VerticalSlider.qml b/widgets/VerticalSlider.qml index 21bdc7a..9b55a0d 100644 --- a/widgets/VerticalSlider.qml +++ b/widgets/VerticalSlider.qml @@ -3,7 +3,6 @@ import qs.services import qs.config import QtQuick import QtQuick.Controls -import QtQuick.Effects Slider { id: root @@ -38,12 +37,10 @@ Slider { implicitWidth: root.width implicitHeight: root.width - RectangularShadow { + Elevation { anchors.fill: parent radius: rect.radius - color: Colours.palette.m3shadow - blur: 5 - spread: 0 + level: handleInteraction.containsMouse ? 2 : 1 } StyledRect { @@ -55,7 +52,10 @@ Slider { radius: Appearance.rounding.full MouseArea { + id: handleInteraction + anchors.fill: parent + hoverEnabled: true cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.NoButton } -- cgit v1.2.3-freya