Removed parts related to Qt5Comapt due to issues working

This commit is contained in:
Eriq Taing
2026-10-01 15:09:51 -04:00
parent 7161783d15
commit faf7fc6ae8
3 changed files with 4 additions and 62 deletions
+4 -43
View File
@@ -2,7 +2,6 @@
import qs.common
import qs.common.widgets
import qs.common.functions
import Qt5Compat.GraphicalEffects
import QtQuick
import QtQuick.Controls
@@ -31,8 +30,8 @@ Button {
property color colRipple: Appearance?.colors.colLayer1Active ?? "#D6CEE2"
property color colRippleToggled: Appearance?.colors.colPrimaryActive ?? "#D6CEE2"
property color buttonColor: root.enabled ?
(root.toggled ?
property color buttonColor: root.enabled ?
(root.toggled ?
(root.hovered ? colBackgroundToggledHover : colBackgroundToggled) :
(root.hovered ? colBackgroundHover : colBackground)) :
colBackground
@@ -61,7 +60,7 @@ Button {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
onPressed: (event) => {
onPressed: (event) => {
if(event.button === Qt.RightButton) {
if (root.altAction) {
root.altAction();
@@ -156,48 +155,10 @@ Button {
Behavior on color {
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
}
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: buttonBackground.width
height: buttonBackground.height
radius: root.buttonEffectiveRadius
}
}
Item {
id: ripple
width: ripple.implicitWidth
height: ripple.implicitHeight
opacity: 0
visible: width > 0 && height > 0
property real implicitWidth: 0
property real implicitHeight: 0
Behavior on opacity {
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
}
RadialGradient {
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0.0; color: root.rippleColor }
GradientStop { position: 0.3; color: root.rippleColor }
GradientStop { position: 0.5; color: Qt.rgba(root.rippleColor.r, root.rippleColor.g, root.rippleColor.b, 0) }
}
}
transform: Translate {
x: -ripple.width / 2
y: -ripple.height / 2
}
}
}
contentItem: StyledText {
text: root.buttonText
color: root.buttonTextColor
}
}
}