Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Apr 4, 2024
1 parent b4329fd commit cf163f5
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
9 changes: 8 additions & 1 deletion src/Qt5/imports/FluentUI/Controls/FluControlBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Item{
radius: control.radius
gradient: Gradient {
GradientStop { position: 0.0; color: d.startColor }
GradientStop { position: 0.88; color: d.startColor }
GradientStop { position: 1 - 3/control.height; color: d.startColor }
GradientStop { position: 1 - 2/control.height; color: d.startColor }
GradientStop { position: 1.0; color: d.endColor}
}
}
Expand All @@ -40,6 +41,12 @@ Item{
leftMargin: control.leftMargin
rightMargin: control.rightMargin
}
Behavior on anchors.bottomMargin {
NumberAnimation{
easing.type: Easing.OutCubic
duration: 167
}
}
radius: control.radius
color: control.color
}
Expand Down
2 changes: 1 addition & 1 deletion src/Qt5/imports/FluentUI/Controls/FluShadow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import FluentUI 1.0
Item {
//高性能阴影!!!比DropShadow阴影性能高出数倍!!!
property color color: FluTheme.dark ? "#AAAAAA" : "#999999"
property int elevation: 6
property int elevation: 5
property int radius: 4
id:control
anchors.fill: parent
Expand Down
5 changes: 3 additions & 2 deletions src/Qt5/imports/FluentUI/Controls/FluTextBoxBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ FluControlBackground{
border.width: 1
gradient: Gradient {
GradientStop { position: 0.0; color: d.startColor }
GradientStop { position: 1 - 3/control.height; color: d.startColor }
GradientStop { position: 1 - 2/control.height; color: d.startColor }
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
GradientStop { position: 1 - 1/control.height; color: d.endColor }
GradientStop { position: 1.0; color: d.endColor }
}
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
QtObject{
id:d
property int offsetSize : inputItem && inputItem.activeFocus ? 2 : 3
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
property color endColor: {
if(!control.enabled){
Expand Down
9 changes: 8 additions & 1 deletion src/Qt6/imports/FluentUI/Controls/FluControlBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Item{
radius: control.radius
gradient: Gradient {
GradientStop { position: 0.0; color: d.startColor }
GradientStop { position: 0.88; color: d.startColor }
GradientStop { position: 1 - 3/control.height; color: d.startColor }
GradientStop { position: 1 - 2/control.height; color: d.startColor }
GradientStop { position: 1.0; color: d.endColor}
}
}
Expand All @@ -40,6 +41,12 @@ Item{
leftMargin: control.leftMargin
rightMargin: control.rightMargin
}
Behavior on anchors.bottomMargin {
NumberAnimation{
easing.type: Easing.OutCubic
duration: 167
}
}
radius: control.radius
color: control.color
}
Expand Down
2 changes: 1 addition & 1 deletion src/Qt6/imports/FluentUI/Controls/FluShadow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import FluentUI
Item {
//高性能阴影!!!比DropShadow阴影性能高出数倍!!!
property color color: FluTheme.dark ? "#AAAAAA" : "#999999"
property int elevation: 6
property int elevation: 5
property int radius: 4
id:control
anchors.fill: parent
Expand Down
5 changes: 3 additions & 2 deletions src/Qt6/imports/FluentUI/Controls/FluTextBoxBackground.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ FluControlBackground{
border.width: 1
gradient: Gradient {
GradientStop { position: 0.0; color: d.startColor }
GradientStop { position: 1 - 3/control.height; color: d.startColor }
GradientStop { position: 1 - 2/control.height; color: d.startColor }
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
GradientStop { position: 1 - 1/control.height; color: d.endColor }
GradientStop { position: 1.0; color: d.endColor }
}
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
QtObject{
id:d
property int offsetSize : inputItem && inputItem.activeFocus ? 2 : 3
property color startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
property color endColor: {
if(!control.enabled){
Expand Down

0 comments on commit cf163f5

Please sign in to comment.