diff --git a/qt6/src/qml/BoxPanel.qml b/qt6/src/qml/BoxPanel.qml index 8d04457c..5dd2fc71 100644 --- a/qt6/src/qml/BoxPanel.qml +++ b/qt6/src/qml/BoxPanel.qml @@ -14,7 +14,9 @@ Item { property D.Palette color2: DS.Style.button.background2 property D.Palette insideBorderColor: DS.Style.button.insideBorder property D.Palette outsideBorderColor: DS.Style.button.outsideBorder - property D.Palette dropShadowColor: DS.Style.button.dropShadow + property D.Palette dropShadowColor0: DS.Style.button.dropShadow0 + property D.Palette dropShadowColor1: DS.Style.button.dropShadow1 + property D.Palette dropShadowColor2: DS.Style.button.dropShadow2 property D.Palette innerShadowColor1: DS.Style.button.innerShadow1 property D.Palette innerShadowColor2: DS.Style.button.innerShadow2 property int boxShadowBlur: 6 @@ -28,9 +30,31 @@ Item { anchors.fill: backgroundRect active: enableBoxShadow sourceComponent: BoxShadow { - shadowBlur: control.boxShadowBlur - shadowOffsetY: control.boxShadowOffsetY - shadowColor: control.D.ColorSelector.dropShadowColor + shadowBlur: 2 + shadowOffsetY: 0 + shadowColor: control.D.ColorSelector.dropShadowColor0//"red" + cornerRadius: backgroundRect.radius + } + } + + Loader { + anchors.fill: backgroundRect + active: enableBoxShadow + sourceComponent: BoxShadow { + shadowBlur: 2 + shadowOffsetY: 1 + shadowColor: control.D.ColorSelector.dropShadowColor1//"green" + cornerRadius: backgroundRect.radius + } + } + + Loader { + anchors.fill: backgroundRect + active: enableBoxShadow + sourceComponent: BoxShadow { + shadowBlur: 2 + shadowOffsetY: 2 + shadowColor: control.D.ColorSelector.dropShadowColor2//"yellow" cornerRadius: backgroundRect.radius } } @@ -61,29 +85,29 @@ Item { 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 - } - } - - 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 + spread: 0 + shadowColor: innerShadowColor // "red" 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 + // + // sourceComponent: BoxInsetShadow { + // shadowBlur: 1 + // shadowOffsetY: 1 + // shadowColor: "red" + // cornerRadius: backgroundRect.radius + // } + // } + Loader { active: insideBorderColor anchors.fill: backgroundRect diff --git a/qt6/src/qml/FlowStyle.qml b/qt6/src/qml/FlowStyle.qml index 4047be98..40cd7d2b 100644 --- a/qt6/src/qml/FlowStyle.qml +++ b/qt6/src/qml/FlowStyle.qml @@ -96,14 +96,14 @@ QtObject { // Button property QtObject button: QtObject { property int width: 140 - property int height: 36 + property int height: 30 property int hPadding: control.radius property int vPadding: control.radius / 2.0 property int iconSize: 24 property D.Palette background1: D.Palette { normal { - common: ("#f7f7f7") + common: ("#f5f5f5") crystal: Qt.rgba(0, 0, 0, 0.1) } normalDark { @@ -111,18 +111,18 @@ QtObject { crystal: Qt.rgba(1, 1, 1, 0.1) } hovered { - common: ("#e1e1e1") + common: ("#e6e6e6") crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2) } pressed { - common: ("#bcc4d0") + common: ("#a9a9a9") crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.15) } } property D.Palette background2: D.Palette { normal { - common: ("#f0f0f0") + common: ("#efefef") crystal: Qt.rgba(0, 0, 0, 0.1) } normalDark { @@ -130,22 +130,39 @@ QtObject { crystal: Qt.rgba(1, 1, 1, 0.1) } hovered { - common: ("#d2d2d2") + common: ("#e6e6e6") crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2) } pressed { - common: ("#cdd6e0") + common: ("#cacaca") crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.15) } } - property D.Palette dropShadow: D.Palette { - normal: Qt.rgba(0, 0, 0, 0.05) + // YOffset: 0 + property D.Palette dropShadow0: D.Palette { + normal: Qt.rgba(0, 0, 0, 0.1) + hovered: Qt.rgba(0, 0, 0, 0.15) + pressed: Qt.rgba(0, 0, 0, 0.15) + } + + // YOffset: 1 + property D.Palette dropShadow1: D.Palette { + normal: Qt.rgba(0, 0, 0, 0.1) hovered: Qt.rgba(0, 0, 0, 0.1) + pressed: Qt.rgba(0, 0, 0, 0.08) } - property D.Palette innerShadow1: D.Palette { + // YOffset: 2 + property D.Palette dropShadow2: D.Palette { normal: Qt.rgba(0, 0, 0, 0.05) + hovered: Qt.rgba(0, 0, 0, 0.05) + pressed: {"transparent"} + } + + property D.Palette innerShadow1: D.Palette { + normal: Qt.rgba(1, 1, 1, 0.4) + hovered: Qt.rgba(1, 1, 1, 0.3) pressed: ("transparent") } @@ -193,7 +210,7 @@ QtObject { crystal: Qt.rgba(0, 0, 0, 1) } pressed { - common: D.DTK.makeColor(D.Color.Highlight) + common: Qt.rgba(0, 0, 0, 0.7) crystal: D.DTK.makeColor(D.Color.Highlight) } } @@ -353,6 +370,12 @@ QtObject { } } + property QtObject recommandButton: QtObject { + property D.Palette text: D.Palette { + normal: D.DTK.makeColor(D.Color.Highlight) + } + } + property QtObject switchButton: QtObject { property int indicatorWidth: 50 property int indicatorHeight: 24 diff --git a/qt6/src/qml/ListView.qml b/qt6/src/qml/ListView.qml index 4dfe99db..b27fd307 100644 --- a/qt6/src/qml/ListView.qml +++ b/qt6/src/qml/ListView.qml @@ -166,7 +166,9 @@ ListView { insideBorderColor: null innerShadowColor1: null innerShadowColor2: null - dropShadowColor: null + dropShadowColor0: null + dropShadowColor1: null + dropShadowColor2: null visible: hoveredItem && !hoveredItem.checked && hoveredItem.enabled color1: D.Palette { diff --git a/qt6/src/qml/RecommandButton.qml b/qt6/src/qml/RecommandButton.qml index 3cd3edc8..752bdace 100644 --- a/qt6/src/qml/RecommandButton.qml +++ b/qt6/src/qml/RecommandButton.qml @@ -8,5 +8,5 @@ import org.deepin.dtk.style 1.0 as DS Button { id: control - highlighted: true + textColor: DS.Style.recommandButton.text } diff --git a/qt6/src/qml/private/ButtonPanel.qml b/qt6/src/qml/private/ButtonPanel.qml index 7396434f..4b527ce7 100644 --- a/qt6/src/qml/private/ButtonPanel.qml +++ b/qt6/src/qml/private/ButtonPanel.qml @@ -16,7 +16,9 @@ BoxPanel { color2: selectValue(DS.Style.button.background2, DS.Style.checkedButton.background, DS.Style.highlightedButton.background2) insideBorderColor: selectValue(DS.Style.button.insideBorder, null, DS.Style.highlightedButton.border) outsideBorderColor: selectValue(DS.Style.button.outsideBorder, null, null) - dropShadowColor: selectValue(DS.Style.button.dropShadow, DS.Style.checkedButton.dropShadow, DS.Style.highlightedButton.dropShadow) + dropShadowColor0: selectValue(DS.Style.button.dropShadow0, DS.Style.checkedButton.dropShadow, DS.Style.highlightedButton.dropShadow) + dropShadowColor1: selectValue(DS.Style.button.dropShadow1, DS.Style.checkedButton.dropShadow, DS.Style.highlightedButton.dropShadow) + dropShadowColor2: selectValue(DS.Style.button.dropShadow2, DS.Style.checkedButton.dropShadow, DS.Style.highlightedButton.dropShadow) innerShadowColor1: selectValue(DS.Style.button.innerShadow1, DS.Style.checkedButton.innerShadow, DS.Style.highlightedButton.innerShadow1) innerShadowColor2: selectValue(DS.Style.button.innerShadow2, null, DS.Style.highlightedButton.innerShadow2) boxShadowBlur: selectValue(control.D.ColorSelector.controlState === D.DTK.PressedState ? 4 : 6, 6, 4) @@ -47,7 +49,7 @@ BoxPanel { Gradient { id: hoverBackgroundGradient GradientStop { position: 0.0; color: control.D.ColorSelector.color1 } - GradientStop { position: 0.96; color: control.D.ColorSelector.color2 } + GradientStop { position: 1.0; color: control.D.ColorSelector.color2 } } CicleSpreadAnimation {