mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-03 08:35:28 +08:00
update
This commit is contained in:
42
src/imports/FluentUI/Controls/FluSpinBox.qml
Normal file
42
src/imports/FluentUI/Controls/FluSpinBox.qml
Normal file
@ -0,0 +1,42 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
import FluentUI
|
||||
|
||||
FluTextBox {
|
||||
id:control
|
||||
width: 200
|
||||
closeRightMargin:55
|
||||
rightPadding: 80
|
||||
text:"0"
|
||||
validator: IntValidator {}
|
||||
inputMethodHints: Qt.ImhDigitsOnly
|
||||
FluIconButton{
|
||||
width: 20
|
||||
height: 20
|
||||
iconSize: 16
|
||||
iconSource: FluentIcons.ChevronUp
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: 30
|
||||
}
|
||||
onClicked: {
|
||||
control.text = Number(control.text) + 1
|
||||
}
|
||||
}
|
||||
FluIconButton{
|
||||
iconSource: FluentIcons.ChevronDown
|
||||
width: 20
|
||||
height: 20
|
||||
iconSize: 16
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: 5
|
||||
}
|
||||
onClicked: {
|
||||
control.text = Number(control.text) - 1
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,6 @@ Rectangle {
|
||||
property color selectionColor: Qt.alpha(FluTheme.primaryColor.lightest,0.6)
|
||||
property color hoverButtonColor: Qt.alpha(selectionColor,0.2)
|
||||
property color pressedButtonColor: Qt.alpha(selectionColor,0.4)
|
||||
|
||||
id:control
|
||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||
onColumnSourceChanged: {
|
||||
@ -190,9 +189,6 @@ Rectangle {
|
||||
id:item_table
|
||||
property var position: Qt.point(column,row)
|
||||
required property bool selected
|
||||
// onSelectedChanged: {
|
||||
// d.selectionFlag = !d.selectionFlag
|
||||
// }
|
||||
color: (row%2!==0) ? control.color : (FluTheme.dark ? Qt.rgba(1,1,1,0.06) : Qt.rgba(0,0,0,0.06))
|
||||
implicitHeight: 40
|
||||
implicitWidth: columnSource[column].width
|
||||
|
@ -12,6 +12,7 @@ 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
|
||||
id:control
|
||||
width: 300
|
||||
enabled: !disabled
|
||||
@ -78,7 +79,7 @@ TextField{
|
||||
anchors{
|
||||
verticalCenter: parent.verticalCenter
|
||||
right: parent.right
|
||||
rightMargin: icon_end.visible ? 25 : 5
|
||||
rightMargin: closeRightMargin
|
||||
}
|
||||
onClicked:{
|
||||
control.text = ""
|
||||
|
Reference in New Issue
Block a user