mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-04 00:55:30 +08:00
update
This commit is contained in:
@ -77,7 +77,7 @@ Button {
|
||||
onClicked: {
|
||||
if(items && menu.count !==0){
|
||||
var pos = control.mapToItem(null, 0, 0)
|
||||
var containerHeight = menu.height
|
||||
var containerHeight = menu.count*36
|
||||
if(window.height>pos.y+control.height+containerHeight){
|
||||
menu.y = control.height
|
||||
}else if(pos.y>containerHeight){
|
||||
@ -90,6 +90,7 @@ Button {
|
||||
}
|
||||
FluMenu{
|
||||
id:menu
|
||||
modal:true
|
||||
width: control.width
|
||||
}
|
||||
}
|
||||
|
@ -79,8 +79,7 @@ Item {
|
||||
Behavior on height {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: expand ? [ 0, 0, 0, 1 ] : [ 1, 0, 0, 0 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ T.Menu {
|
||||
spacing: 0
|
||||
delegate: FluMenuItem { }
|
||||
enter: Transition {
|
||||
reversible: true
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
from:0
|
||||
|
@ -122,8 +122,7 @@ Item {
|
||||
Behavior on height {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -140,8 +139,7 @@ Item {
|
||||
Behavior on height {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
width: layout_list.width
|
||||
@ -333,8 +331,7 @@ Item {
|
||||
Behavior on height {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
clip: true
|
||||
@ -571,8 +568,7 @@ Item {
|
||||
Behavior on Layout.preferredWidth {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -638,8 +634,7 @@ Item {
|
||||
Behavior on anchors.leftMargin {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
StackView{
|
||||
@ -695,15 +690,13 @@ Item {
|
||||
Behavior on width {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
Behavior on x {
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
visible: {
|
||||
@ -768,7 +761,7 @@ Item {
|
||||
clip: true
|
||||
ScrollBar.vertical: FluScrollBar {}
|
||||
model:d.handleItems()
|
||||
highlightMoveDuration: 150
|
||||
highlightMoveDuration: 167
|
||||
highlight: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
|
@ -27,7 +27,8 @@ Item {
|
||||
clip: true
|
||||
spacing: 20
|
||||
interactive: false
|
||||
orientation:ListView.Horizontal
|
||||
orientation: ListView.Horizontal
|
||||
highlightMoveDuration: 167
|
||||
highlight: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
@ -38,7 +39,8 @@ Item {
|
||||
y:37
|
||||
Behavior on width {
|
||||
NumberAnimation{
|
||||
duration: 150
|
||||
duration: 167
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,11 +63,6 @@ Item {
|
||||
return normalColor
|
||||
}
|
||||
}
|
||||
transitions: Transition {
|
||||
NumberAnimation{
|
||||
duration: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
nav_list.currentIndex = index
|
||||
|
30
src/imports/FluentUI/Controls/FluRadioButtons.qml
Normal file
30
src/imports/FluentUI/Controls/FluRadioButtons.qml
Normal file
@ -0,0 +1,30 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Basic
|
||||
import QtQuick.Layouts
|
||||
import FluentUI
|
||||
|
||||
ColumnLayout {
|
||||
default property alias buttons: control.data
|
||||
property int currentIndex : -1
|
||||
id:control
|
||||
onCurrentIndexChanged: {
|
||||
for(var i = 0;i<buttons.length;i++){
|
||||
buttons[i].checked = false
|
||||
}
|
||||
buttons[currentIndex].checked = true
|
||||
}
|
||||
Component.onCompleted: {
|
||||
for(var i = 0;i<buttons.length;i++){
|
||||
buttons[i].clickListener = function(){
|
||||
for(var i = 0;i<buttons.length;i++){
|
||||
var button = buttons[i]
|
||||
if(this === button){
|
||||
currentIndex = i
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
currentIndex = 0
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user