From 7e21c4edf92a18bd91c6dc9d8d1fd6e840d3cd17 Mon Sep 17 00:00:00 2001 From: YeShanShan Date: Tue, 14 Jan 2025 14:41:20 +0800 Subject: [PATCH] chore: drop shadow for BoxPanel drop shadow and gradient color. adjust Button's radius from6 to 8. pms: BUG-297055 --- qt6/src/qml/BoxPanel.qml | 72 ++++++++++++++--------------- qt6/src/qml/FlowStyle.qml | 4 +- qt6/src/qml/private/ButtonPanel.qml | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/qt6/src/qml/BoxPanel.qml b/qt6/src/qml/BoxPanel.qml index 8d04457c..9de0e492 100644 --- a/qt6/src/qml/BoxPanel.qml +++ b/qt6/src/qml/BoxPanel.qml @@ -24,16 +24,16 @@ Item { property bool backgroundFlowsHovered: true property bool enableBoxShadow: control.D.ColorSelector.family === D.Palette.CommonColor - Loader { - anchors.fill: backgroundRect - active: enableBoxShadow - sourceComponent: BoxShadow { - shadowBlur: control.boxShadowBlur - shadowOffsetY: control.boxShadowOffsetY - shadowColor: control.D.ColorSelector.dropShadowColor - cornerRadius: backgroundRect.radius - } - } + // Loader { + // anchors.fill: backgroundRect + // active: enableBoxShadow + // sourceComponent: BoxShadow { + // shadowBlur: control.boxShadowBlur + // shadowOffsetY: control.boxShadowOffsetY + // shadowColor: control.D.ColorSelector.dropShadowColor + // cornerRadius: backgroundRect.radius + // } + // } Rectangle { id: backgroundRect @@ -51,38 +51,38 @@ Item { anchors.fill: parent radius: control.radius - gradient: D.ColorSelector.color1 === D.ColorSelector.color2 ? null : backgroundGradient + // gradient: D.ColorSelector.color1 === D.ColorSelector.color2 ? null : backgroundGradient color: D.ColorSelector.color1 } - Loader { - anchors.fill: backgroundRect - readonly property color innerShadowColor: control.D.ColorSelector.innerShadowColor1 - active: innerShadowColor1 && innerShadowColor.a !== 0 && control.D.ColorSelector.family === D.Palette.CommonColor - z: D.DTK.AboveOrder + // Loader { + // anchors.fill: backgroundRect + // readonly property color innerShadowColor: control.D.ColorSelector.innerShadowColor1 + // active: innerShadowColor1 && innerShadowColor.a !== 0 && control.D.ColorSelector.family === D.Palette.CommonColor + // z: D.DTK.AboveOrder - sourceComponent: BoxInsetShadow { - shadowBlur: 2 - shadowOffsetY: control.innerShadowOffsetY1 - spread: 1 - shadowColor: innerShadowColor - cornerRadius: backgroundRect.radius - } - } + // sourceComponent: BoxInsetShadow { + // shadowBlur: 2 + // shadowOffsetY: control.innerShadowOffsetY1 + // spread: 1 + // shadowColor: innerShadowColor + // cornerRadius: backgroundRect.radius + // } + // } - Loader { - anchors.fill: backgroundRect - readonly property color innerShadowColor: control.D.ColorSelector.innerShadowColor2 - active: innerShadowColor2 && innerShadowColor.a !== 0 && control.D.ColorSelector.family === D.Palette.CommonColor - z: D.DTK.AboveOrder + // Loader { + // anchors.fill: backgroundRect + // readonly property color innerShadowColor: control.D.ColorSelector.innerShadowColor2 + // active: innerShadowColor2 && innerShadowColor.a !== 0 && control.D.ColorSelector.family === D.Palette.CommonColor + // z: D.DTK.AboveOrder - sourceComponent: BoxInsetShadow { - shadowBlur: 1 - shadowOffsetY: 1 - shadowColor: innerShadowColor - cornerRadius: backgroundRect.radius - } - } + // sourceComponent: BoxInsetShadow { + // shadowBlur: 1 + // shadowOffsetY: 1 + // shadowColor: innerShadowColor + // cornerRadius: backgroundRect.radius + // } + // } Loader { active: insideBorderColor diff --git a/qt6/src/qml/FlowStyle.qml b/qt6/src/qml/FlowStyle.qml index 16602029..50e34c22 100644 --- a/qt6/src/qml/FlowStyle.qml +++ b/qt6/src/qml/FlowStyle.qml @@ -7,7 +7,7 @@ import org.deepin.dtk 1.0 as D QtObject { property QtObject control: QtObject { - property int radius: 6 + property int radius: 8 property int spacing: 6 property int padding: 6 property int borderWidth: 1 @@ -701,7 +701,7 @@ QtObject { property QtObject highlightPanel: QtObject { property int width: 180 property int height: 30 - property int radius: 6 + property int radius: 8 property D.Palette background: D.Palette { normal: D.DTK.makeColor(D.Color.Highlight) diff --git a/qt6/src/qml/private/ButtonPanel.qml b/qt6/src/qml/private/ButtonPanel.qml index 7396434f..58446a53 100644 --- a/qt6/src/qml/private/ButtonPanel.qml +++ b/qt6/src/qml/private/ButtonPanel.qml @@ -58,7 +58,7 @@ BoxPanel { Rectangle { anchors.fill: parent radius: control.radius - gradient: control.D.ColorSelector.color1 === control.D.ColorSelector.color2 ? null : hoverBackgroundGradient + // gradient: control.D.ColorSelector.color1 === control.D.ColorSelector.color2 ? null : hoverBackgroundGradient color: control.D.ColorSelector.color1 } function triggle() {