main
zhuzihcu 2023-04-19 14:13:46 +08:00
parent 7dcb65f7b6
commit 5b836a4d82
2 changed files with 11 additions and 13 deletions

View File

@ -73,16 +73,16 @@ Item{
anchors.horizontalCenter: vertical ? parent.horizontalCenter : undefined anchors.horizontalCenter: vertical ? parent.horizontalCenter : undefined
color:FluTheme.dark ? Qt.rgba(69/255,69/255,69/255,1) :Qt.rgba(1,1,1,1) color:FluTheme.dark ? Qt.rgba(69/255,69/255,69/255,1) :Qt.rgba(1,1,1,1)
Rectangle{ Rectangle{
width: dotSize/2 width: dotSize
height: dotSize/2 height: dotSize
radius: dotSize/4 radius: dotSize/2
color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark color:FluTheme.dark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark
anchors.centerIn: parent anchors.centerIn: parent
scale: { scale: {
if(control_mouse.pressed){ if(control_mouse.pressed){
return 0.9 return 4/10
} }
return control_mouse.containsMouse || mouse_line.containsMouse ? 1.3 : 1 return control_mouse.containsMouse || mouse_line.containsMouse ? 6/10 : 5/10
} }
Behavior on scale { Behavior on scale {
NumberAnimation{ NumberAnimation{

View File

@ -57,18 +57,16 @@ FluControl {
border.width: 1 border.width: 1
border.color: selected ? Qt.lighter(FluTheme.primaryColor.dark,1.2) : "#666666" border.color: selected ? Qt.lighter(FluTheme.primaryColor.dark,1.2) : "#666666"
Rectangle { Rectangle {
width: pressed ? control.height - 4 : control.height - 8 width: pressed ? 28 : 20
anchors{ anchors{
left: selected ? undefined : parent.left left: selected ? undefined : parent.left
leftMargin: selected ? control_backgound.width - width - 4 : 4 leftMargin: selected ? 10 : 0
right: selected ? parent.right : undefined right: selected ? parent.right : undefined
rightMargin: selected ? 4 : control_backgound.width - width - 4 rightMargin: selected ? 0: 10
} }
height: control.height - 8 height: 20
radius: width / 2 radius: 10
antialiasing: true scale: hovered ? 7/10 : 6/10
scale: hovered ? 1.2 : 1.0
smooth: true
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: selected ? "#FFFFFF" : "#666666" color: selected ? "#FFFFFF" : "#666666"
Behavior on anchors.leftMargin { Behavior on anchors.leftMargin {