Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkdeclarative
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#287
  • Loading branch information
deepin-ci-robot authored and 18202781743 committed Jan 30, 2024
1 parent bcad460 commit 34a48b9
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 34 deletions.
2 changes: 1 addition & 1 deletion qt6/src/qml/BoxPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Item {
id: backgroundGradient
// Use the backgroundRect's colorselecor can filter the hovered state.
GradientStop { position: 0.0; color: backgroundRect.D.ColorSelector.color1}
GradientStop { position: 0.96; color: backgroundRect.D.ColorSelector.color2}
GradientStop { position: 1.0; color: backgroundRect.D.ColorSelector.color2}
}

anchors.fill: parent
Expand Down
2 changes: 2 additions & 0 deletions qt6/src/qml/ButtonBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ Control {
implicitWidth: DS.Style.buttonBox.width
implicitHeight: DS.Style.buttonBox.height
backgroundFlowsHovered: D.ColorSelector.family === D.Palette.CrystalColor
outsideBorderColor: null
color2: color1
}
}
47 changes: 32 additions & 15 deletions qt6/src/qml/FlowStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ QtObject {
common: ("#f7f7f7")
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: ("#e1e1e1")
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2)
Expand All @@ -121,6 +125,10 @@ QtObject {
common: ("#f0f0f0")
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: ("#d2d2d2")
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2)
Expand Down Expand Up @@ -152,8 +160,18 @@ QtObject {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered: Qt.rgba(1, 1, 1, 0.2)
pressed: Qt.rgba(0, 0, 0, 0.03)
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: Qt.rgba(1, 1, 1, 0.2)
crystal: Qt.rgba(0, 0, 0, 0.05)
}
pressed {
common: Qt.rgba(1, 1, 1, 0.03)
crystal: Qt.rgba(0, 0, 0, 0.03)
}
}

property D.Palette outsideBorder: D.Palette {
Expand All @@ -167,8 +185,8 @@ QtObject {

property D.Palette text: D.Palette {
normal {
common: Qt.rgba(0, 0, 0, 0.7)
crystal: Qt.rgba(0, 0, 0, 0.9)
common: Qt.rgba(0, 0, 0, 1)
crystal: Qt.rgba(0, 0, 0, 1)
}
pressed {
common: D.DTK.makeColor(D.Color.Highlight)
Expand Down Expand Up @@ -238,12 +256,11 @@ QtObject {

property D.Palette dropShadow: D.Palette {
normal {
common: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+30)
common: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(-60)
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark: D.DTK.makeColor(D.Color.Highlight).saturation(+15).lightness(+12).opacity(+20)
hovered: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+30)
pressed: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+20)
pressed: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(-80)
disabled: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+30)
}

Expand Down Expand Up @@ -356,14 +373,14 @@ QtObject {

property QtObject iconButton: QtObject {
property int backgroundSize: 36
property int iconSize: 18
property int iconSize: 16
property int padding: 9
}

property QtObject toolButton: QtObject {
property int width: 36
property int height: 36
property int iconSize: 14
property int width: 30
property int height: 30
property int iconSize: 16
property int indicatorRightMargin: 6
}

Expand All @@ -385,10 +402,10 @@ QtObject {
}

property QtObject buttonBox: QtObject {
property int width: 80
property int height: 36
property int padding: 3
property int spacing: 6
property int width: 60
property int height: 30
property int padding: 0
property int spacing: 0
}

property QtObject comboBox: QtObject {
Expand Down
2 changes: 1 addition & 1 deletion qt6/src/qml/InsideBoxBorder.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QtQuick 2.0

Item {
property real borderWidth: 1
property color color: "white"
property color color: Qt.rgba(1, 1, 1, 0.15)
property alias radius: rect.radius

Rectangle {
Expand Down
1 change: 1 addition & 0 deletions qt6/src/qml/ItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ T.ItemDelegate {
width: DS.Style.itemDelegate.iconSize
height: DS.Style.itemDelegate.iconSize
}
font: D.DTK.fontManager.t9

indicator: Loader {
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding)
Expand Down
1 change: 1 addition & 0 deletions qt6/src/qml/ToolButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ T.ToolButton {
implicitWidth: DS.Style.toolButton.width
implicitHeight: DS.Style.toolButton.height
button: control
outsideBorderColor: null
}
}
2 changes: 1 addition & 1 deletion src/qml/BoxPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Item {
id: backgroundGradient
// Use the backgroundRect's colorselecor can filter the hovered state.
GradientStop { position: 0.0; color: backgroundRect.D.ColorSelector.color1}
GradientStop { position: 0.96; color: backgroundRect.D.ColorSelector.color2}
GradientStop { position: 1.0; color: backgroundRect.D.ColorSelector.color2}
}

anchors.fill: parent
Expand Down
2 changes: 2 additions & 0 deletions src/qml/ButtonBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ Control {
implicitWidth: DS.Style.buttonBox.width
implicitHeight: DS.Style.buttonBox.height
backgroundFlowsHovered: D.ColorSelector.family === D.Palette.CrystalColor
outsideBorderColor: null
color2: color1
}
}
47 changes: 32 additions & 15 deletions src/qml/FlowStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ QtObject {
common: ("#f7f7f7")
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: ("#e1e1e1")
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2)
Expand All @@ -121,6 +125,10 @@ QtObject {
common: ("#f0f0f0")
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: ("#d2d2d2")
crystal: Qt.rgba(16.0 / 255, 16.0 / 255, 16.0 / 255, 0.2)
Expand Down Expand Up @@ -152,8 +160,18 @@ QtObject {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered: Qt.rgba(1, 1, 1, 0.2)
pressed: Qt.rgba(0, 0, 0, 0.03)
normalDark {
common: Qt.rgba(1, 1, 1, 0.1)
crystal: Qt.rgba(1, 1, 1, 0.1)
}
hovered {
common: Qt.rgba(1, 1, 1, 0.2)
crystal: Qt.rgba(0, 0, 0, 0.05)
}
pressed {
common: Qt.rgba(1, 1, 1, 0.03)
crystal: Qt.rgba(0, 0, 0, 0.03)
}
}

property D.Palette outsideBorder: D.Palette {
Expand All @@ -167,8 +185,8 @@ QtObject {

property D.Palette text: D.Palette {
normal {
common: Qt.rgba(0, 0, 0, 0.7)
crystal: Qt.rgba(0, 0, 0, 0.9)
common: Qt.rgba(0, 0, 0, 1)
crystal: Qt.rgba(0, 0, 0, 1)
}
pressed {
common: D.DTK.makeColor(D.Color.Highlight)
Expand Down Expand Up @@ -238,12 +256,11 @@ QtObject {

property D.Palette dropShadow: D.Palette {
normal {
common: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+30)
common: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(-60)
crystal: Qt.rgba(0, 0, 0, 0.1)
}
normalDark: D.DTK.makeColor(D.Color.Highlight).saturation(+15).lightness(+12).opacity(+20)
hovered: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+30)
pressed: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+20)
pressed: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(-80)
disabled: D.DTK.makeColor(D.Color.Highlight).saturation(+50).lightness(-10).opacity(+30)
}

Expand Down Expand Up @@ -356,14 +373,14 @@ QtObject {

property QtObject iconButton: QtObject {
property int backgroundSize: 36
property int iconSize: 18
property int iconSize: 16
property int padding: 9
}

property QtObject toolButton: QtObject {
property int width: 36
property int height: 36
property int iconSize: 14
property int width: 30
property int height: 30
property int iconSize: 16
property int indicatorRightMargin: 6
}

Expand All @@ -385,10 +402,10 @@ QtObject {
}

property QtObject buttonBox: QtObject {
property int width: 80
property int height: 36
property int padding: 3
property int spacing: 6
property int width: 30
property int height: 30
property int padding: 0
property int spacing: 0
}

property QtObject comboBox: QtObject {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/InsideBoxBorder.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QtQuick 2.0

Item {
property real borderWidth: 1
property color color: "white"
property color color: Qt.rgba(1, 1, 1, 0.15)
property alias radius: rect.radius

Rectangle {
Expand Down
1 change: 1 addition & 0 deletions src/qml/ItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ T.ItemDelegate {
width: DS.Style.itemDelegate.iconSize
height: DS.Style.itemDelegate.iconSize
}
font: D.DTK.fontManager.t9

indicator: Loader {
x: control.text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding)
Expand Down
1 change: 1 addition & 0 deletions src/qml/ToolButton.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ T.ToolButton {
implicitWidth: DS.Style.toolButton.width
implicitHeight: DS.Style.toolButton.height
button: control
outsideBorderColor: null
}
}

0 comments on commit 34a48b9

Please sign in to comment.