mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
169ca17a6a
commit
56188cfa51
@ -17,29 +17,24 @@ FluScrollablePage{
|
||||
Layout.topMargin: 20
|
||||
|
||||
FluTextBox{
|
||||
Layout.topMargin: 20
|
||||
placeholderText: "单行输入框"
|
||||
Layout.preferredWidth: 300
|
||||
disabled:text_box_switch.checked
|
||||
cleanEnabled: true
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
Row{
|
||||
spacing: 5
|
||||
FluToggleSwitch{
|
||||
id:text_box_switch
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
}
|
||||
FluToggleSwitch{
|
||||
id:text_box_switch
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text:"Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
CodeExpander{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -1
|
||||
@ -55,29 +50,22 @@ FluScrollablePage{
|
||||
Layout.topMargin: 20
|
||||
|
||||
FluPasswordBox{
|
||||
Layout.topMargin: 20
|
||||
placeholderText: "请输入密码"
|
||||
Layout.preferredWidth: 300
|
||||
disabled:password_box_switch.checked
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
Row{
|
||||
spacing: 5
|
||||
FluToggleSwitch{
|
||||
id:password_box_switch
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
}
|
||||
FluToggleSwitch{
|
||||
id:password_box_switch
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text:"Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
CodeExpander{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -1
|
||||
@ -95,9 +83,7 @@ FluScrollablePage{
|
||||
|
||||
FluMultilineTextBox{
|
||||
id:multiine_textbox
|
||||
Layout.topMargin: 20
|
||||
placeholderText: "多行输入框"
|
||||
Layout.preferredWidth: 300
|
||||
disabled:text_box_multi_switch.checked
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
@ -105,19 +91,15 @@ FluScrollablePage{
|
||||
}
|
||||
}
|
||||
|
||||
Row{
|
||||
spacing: 5
|
||||
FluToggleSwitch{
|
||||
id:text_box_multi_switch
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
}
|
||||
FluToggleSwitch{
|
||||
id:text_box_multi_switch
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text:"Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
CodeExpander{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -1
|
||||
@ -126,17 +108,13 @@ FluScrollablePage{
|
||||
}'
|
||||
}
|
||||
|
||||
|
||||
FluArea{
|
||||
Layout.fillWidth: true
|
||||
height: 68
|
||||
paddings: 10
|
||||
Layout.topMargin: 20
|
||||
|
||||
FluAutoSuggestBox{
|
||||
Layout.topMargin: 20
|
||||
placeholderText: "AutoSuggestBox"
|
||||
Layout.preferredWidth: 300
|
||||
items:generateRandomNames(100)
|
||||
disabled:text_box_suggest_switch.checked
|
||||
anchors{
|
||||
@ -144,20 +122,15 @@ FluScrollablePage{
|
||||
left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
Row{
|
||||
spacing: 5
|
||||
FluToggleSwitch{
|
||||
id:text_box_suggest_switch
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
}
|
||||
FluToggleSwitch{
|
||||
id:text_box_suggest_switch
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text:"Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
CodeExpander{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -1
|
||||
@ -171,34 +144,26 @@ FluScrollablePage{
|
||||
height: 68
|
||||
paddings: 10
|
||||
Layout.topMargin: 20
|
||||
|
||||
FluSpinBox{
|
||||
Layout.topMargin: 20
|
||||
disabled: spin_box_switch.checked
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
Row{
|
||||
spacing: 5
|
||||
FluToggleSwitch{
|
||||
id:spin_box_switch
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
}
|
||||
FluToggleSwitch{
|
||||
id:spin_box_switch
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text:"Disabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
CodeExpander{
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: -1
|
||||
code:'FluSpinBox{
|
||||
|
||||
}'
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ Rectangle{
|
||||
id:com_edit
|
||||
FluTextBox{
|
||||
rightPadding: 80
|
||||
closeRightMargin: 55
|
||||
iconRightMargin: 55
|
||||
disabled: control.disabled
|
||||
validator: control.validator
|
||||
text: d._displayText
|
||||
|
@ -12,7 +12,8 @@ TextField{
|
||||
property color placeholderNormalColor: FluTheme.dark ? Qt.rgba(210/255,210/255,210/255,1) : Qt.rgba(96/255,96/255,96/255,1)
|
||||
property color placeholderFocusColor: FluTheme.dark ? Qt.rgba(152/255,152/255,152/255,1) : Qt.rgba(141/255,141/255,141/255,1)
|
||||
property color placeholderDisableColor: FluTheme.dark ? Qt.rgba(131/255,131/255,131/255,1) : Qt.rgba(160/255,160/255,160/255,1)
|
||||
property int closeRightMargin: icon_end.visible ? 25 : 5
|
||||
property int iconRightMargin: icon_end.visible ? 25 : 5
|
||||
property bool cleanEnabled: false
|
||||
id:control
|
||||
width: 300
|
||||
padding: 8
|
||||
@ -74,6 +75,9 @@ TextField{
|
||||
width: 20
|
||||
height: 20
|
||||
visible: {
|
||||
if(control.cleanEnabled === false){
|
||||
return false
|
||||
}
|
||||
if(control.readOnly)
|
||||
return false
|
||||
return control.text !== ""
|
||||
@ -81,7 +85,7 @@ TextField{
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: closeRightMargin
|
||||
rightMargin: control.iconRightMargin
|
||||
}
|
||||
contentDescription:"清空"
|
||||
onClicked:{
|
||||
|
Loading…
Reference in New Issue
Block a user