mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-22 10:40:10 +08:00
Compare commits
3 Commits
84b2045b5f
...
6b617d10d5
Author | SHA1 | Date | |
---|---|---|---|
|
6b617d10d5 | ||
|
cf163f5e3b | ||
|
b4329fdd0a |
@ -63,10 +63,10 @@ T.ComboBox {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
background: FluTextBoxBackground{
|
background: FluTextBoxBackground{
|
||||||
border.width: 0
|
border.width: 1
|
||||||
bottomMargin: {
|
bottomMargin: {
|
||||||
if(!control.editable){
|
if(!control.editable){
|
||||||
return 0
|
return 1
|
||||||
}
|
}
|
||||||
return contentItem && contentItem.activeFocus ? 2 : 1
|
return contentItem && contentItem.activeFocus ? 2 : 1
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ Item{
|
|||||||
radius: control.radius
|
radius: control.radius
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop { position: 0.0; color: d.startColor }
|
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.0; color: d.endColor}
|
GradientStop { position: 1.0; color: d.endColor}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,6 +40,12 @@ Item{
|
|||||||
leftMargin: control.leftMargin
|
leftMargin: control.leftMargin
|
||||||
rightMargin: control.rightMargin
|
rightMargin: control.rightMargin
|
||||||
}
|
}
|
||||||
|
Behavior on anchors.bottomMargin {
|
||||||
|
NumberAnimation{
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
duration: 167
|
||||||
|
}
|
||||||
|
}
|
||||||
radius: control.radius
|
radius: control.radius
|
||||||
color: control.color
|
color: control.color
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import FluentUI 1.0
|
|||||||
Item {
|
Item {
|
||||||
//高性能阴影!!!比DropShadow阴影性能高出数倍!!!
|
//高性能阴影!!!比DropShadow阴影性能高出数倍!!!
|
||||||
property color color: FluTheme.dark ? "#AAAAAA" : "#999999"
|
property color color: FluTheme.dark ? "#AAAAAA" : "#999999"
|
||||||
property int elevation: 6
|
property int elevation: 5
|
||||||
property int radius: 4
|
property int radius: 4
|
||||||
id:control
|
id:control
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -20,13 +20,14 @@ FluControlBackground{
|
|||||||
border.width: 1
|
border.width: 1
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop { position: 0.0; color: d.startColor }
|
GradientStop { position: 0.0; color: d.startColor }
|
||||||
GradientStop { position: 1 - 3/control.height; color: d.startColor }
|
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
|
||||||
GradientStop { position: 1 - 2/control.height; color: d.startColor }
|
GradientStop { position: 1 - 1/control.height; color: d.endColor }
|
||||||
GradientStop { position: 1.0; color: d.endColor }
|
GradientStop { position: 1.0; color: d.endColor }
|
||||||
}
|
}
|
||||||
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
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 startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||||
property color endColor: {
|
property color endColor: {
|
||||||
if(!control.enabled){
|
if(!control.enabled){
|
||||||
|
@ -63,10 +63,10 @@ T.ComboBox {
|
|||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
background: FluTextBoxBackground{
|
background: FluTextBoxBackground{
|
||||||
border.width: 0
|
border.width: 1
|
||||||
bottomMargin: {
|
bottomMargin: {
|
||||||
if(!control.editable){
|
if(!control.editable){
|
||||||
return 0
|
return 1
|
||||||
}
|
}
|
||||||
return contentItem && contentItem.activeFocus ? 2 : 1
|
return contentItem && contentItem.activeFocus ? 2 : 1
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ Item{
|
|||||||
radius: control.radius
|
radius: control.radius
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop { position: 0.0; color: d.startColor }
|
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.0; color: d.endColor}
|
GradientStop { position: 1.0; color: d.endColor}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,6 +40,12 @@ Item{
|
|||||||
leftMargin: control.leftMargin
|
leftMargin: control.leftMargin
|
||||||
rightMargin: control.rightMargin
|
rightMargin: control.rightMargin
|
||||||
}
|
}
|
||||||
|
Behavior on anchors.bottomMargin {
|
||||||
|
NumberAnimation{
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
duration: 167
|
||||||
|
}
|
||||||
|
}
|
||||||
radius: control.radius
|
radius: control.radius
|
||||||
color: control.color
|
color: control.color
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import FluentUI
|
|||||||
Item {
|
Item {
|
||||||
//高性能阴影!!!比DropShadow阴影性能高出数倍!!!
|
//高性能阴影!!!比DropShadow阴影性能高出数倍!!!
|
||||||
property color color: FluTheme.dark ? "#AAAAAA" : "#999999"
|
property color color: FluTheme.dark ? "#AAAAAA" : "#999999"
|
||||||
property int elevation: 6
|
property int elevation: 5
|
||||||
property int radius: 4
|
property int radius: 4
|
||||||
id:control
|
id:control
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -20,13 +20,14 @@ FluControlBackground{
|
|||||||
border.width: 1
|
border.width: 1
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop { position: 0.0; color: d.startColor }
|
GradientStop { position: 0.0; color: d.startColor }
|
||||||
GradientStop { position: 1 - 3/control.height; color: d.startColor }
|
GradientStop { position: 1 - d.offsetSize/control.height; color: d.startColor }
|
||||||
GradientStop { position: 1 - 2/control.height; color: d.startColor }
|
GradientStop { position: 1 - 1/control.height; color: d.endColor }
|
||||||
GradientStop { position: 1.0; color: d.endColor }
|
GradientStop { position: 1.0; color: d.endColor }
|
||||||
}
|
}
|
||||||
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
bottomMargin: inputItem && inputItem.activeFocus ? 2 : 1
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
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 startColor: FluTheme.dark ? Qt.rgba(66/255,66/255,66/255,1) : Qt.rgba(232/255,232/255,232/255,1)
|
||||||
property color endColor: {
|
property color endColor: {
|
||||||
if(!control.enabled){
|
if(!control.enabled){
|
||||||
|
Loading…
Reference in New Issue
Block a user