Skip to content

Commit

Permalink
chore: drop shadow for BoxPanel
Browse files Browse the repository at this point in the history
drop shadow and gradient color.
adjust Button's radius from6 to 8.

pms: BUG-297055
  • Loading branch information
18202781743 committed Jan 14, 2025
1 parent e2f51ee commit 7e21c4e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 39 deletions.
72 changes: 36 additions & 36 deletions qt6/src/qml/BoxPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions qt6/src/qml/FlowStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion qt6/src/qml/private/ButtonPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 7e21c4e

Please sign in to comment.