Commit e5c8b6b6 authored by Devin Lin's avatar Devin Lin 🎨
Browse files

Replace SmallShadow with SmallBoxShadow

parent 28c61531
Pipeline #184925 passed with stage
in 1 minute
......@@ -82,14 +82,12 @@ Kirigami.ShadowedRectangle {
}
}
SmallShadow {
id: shadowRect
SmallBoxShadow {
opacity: control.down ? 0 : 1
visible: !control.editable && !control.flat && control.enabled
z: -1
radius: mainBackground.radius
}
FocusRect {
id: focusRect
baseRadius: mainBackground.radius
......
......@@ -57,11 +57,10 @@ Rectangle {
}
}
SmallShadow {
SmallBoxShadow {
id: shadow
opacity: control.down ? 0 : 1
visible: control.enabled
z: -1
radius: parent.radius
}
......
......@@ -68,11 +68,10 @@ Rectangle {
radius: Impl.Units.smallRadius
SmallShadow {
SmallBoxShadow {
id: shadow
opacity: control.down ? 0 : 1
visible: !control.editable && !control.flat && control.enabled
z: -1
radius: parent.radius
}
......
......@@ -51,11 +51,10 @@ Rectangle {
}
}
SmallShadow {
SmallBoxShadow {
id: shadow
opacity: control.down ? 0 : 1
visible: control.enabled
z: -1
radius: parent.radius
}
......
......@@ -81,11 +81,10 @@ Rectangle {
}
}
SmallShadow {
SmallBoxShadow {
id: shadow
opacity: root.pressed ? 0 : 1
visible: control.enabled
z: -1
radius: parent.radius
}
......
/* SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
import QtQuick 2.15
import org.kde.kirigami 2.19 as Kirigami
import "." as Impl
// Simple box shadow which is ideal for subtle shadows, as it is very performant.
Rectangle {
id: root
anchors.top: parent.top
anchors.topMargin: 1
anchors.left: parent.left
anchors.right: parent.right
height: parent.height
z: -1
color: Qt.rgba(0, 0, 0, 0.1)
}
/* SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
import QtQuick 2.15
import org.kde.kirigami 2.19 as Kirigami
import "." as Impl
Loader {
id: root
property real radius: Impl.Units.smallRadius
anchors.fill: parent
z: -1
active: visible && !Kirigami.Theme.lowPowerHardware
sourceComponent: Component {
Kirigami.ShadowedRectangle {
anchors.fill: parent
radius: root.radius
color: "transparent"
shadow {
color: Qt.rgba(0,0,0,0.2)
size: 2
yOffset: 1
}
opacity: parent.opacity
Behavior on opacity {
OpacityAnimator {
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
}
}
}
......@@ -101,11 +101,10 @@ Item {
}
}
SmallShadow {
SmallBoxShadow {
id: shadow
opacity: control.down ? 0 : 1
visible: control.enabled
z: -1
radius: parent.radius
}
......
......@@ -24,7 +24,7 @@ RadioIndicator 1.0 RadioIndicator.qml
ScrollHandle 1.0 ScrollHandle.qml
SliderGroove 1.0 SliderGroove.qml
SliderHandle 1.0 SliderHandle.qml
SmallShadow 1.0 SmallShadow.qml
SmallBoxShadow 1.0 SmallBoxShadow.qml
SpinBoxIndicator 1.0 SpinBoxIndicator.qml
SwitchIndicator 1.0 SwitchIndicator.qml
TextEditBackground 1.0 TextEditBackground.qml
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment