This commit is contained in:
朱子楚\zhuzi 2023-07-01 07:54:43 +08:00
parent 74940665ae
commit 9ff81251c8
9 changed files with 24 additions and 12 deletions

View File

@ -19,7 +19,7 @@ endif()
file(TO_CMAKE_PATH "/" PATH_SEPARATOR) file(TO_CMAKE_PATH "/" PATH_SEPARATOR)
# #
add_definitions(-DVERSION=1,3,7,1) add_definitions(-DVERSION=1,3,7,2)
find_package(Qt6 REQUIRED COMPONENTS Quick) find_package(Qt6 REQUIRED COMPONENTS Quick)

View File

@ -64,8 +64,8 @@ FluContentPage{
address: getRandomAddresses(), address: getRandomAddresses(),
nickname: getRandomNickname(), nickname: getRandomNickname(),
longstring:"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好", longstring:"你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好你好",
height:44, height:46,
minimumHeight:44, minimumHeight:46,
maximumHeight:300, maximumHeight:300,
action:com_action action:com_action
}) })

View File

@ -174,7 +174,7 @@ FluScrollablePage{
FluSpinBox{ FluSpinBox{
Layout.topMargin: 20 Layout.topMargin: 20
// disabled: spin_box_switch.checked disabled: spin_box_switch.checked
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
left: parent.left left: parent.left

View File

@ -180,7 +180,7 @@ CustomWindow {
} }
} }
transformOrigin: Item.Center transformOrigin: Item.Center
onLoginClicked:{ onLogoClicked:{
clickCount += 1 clickCount += 1
if(clickCount === 1){ if(clickCount === 1){
loader.reload() loader.reload()

View File

@ -12,7 +12,7 @@ endif()
set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI) set(QML_PLUGIN_DIRECTORY ${CMAKE_PREFIX_PATH}/qml/FluentUI)
# #
add_definitions(-DVERSION=1,3,7,1) add_definitions(-DVERSION=1,3,7,2)
find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml) find_package(Qt6 REQUIRED COMPONENTS Core Quick Qml)

View File

@ -27,7 +27,7 @@ Item {
property Component autoSuggestBox property Component autoSuggestBox
property Component actionItem property Component actionItem
property int topPadding: 0 property int topPadding: 0
signal loginClicked signal logoClicked
id:control id:control
QtObject{ QtObject{
id:d id:d
@ -584,7 +584,7 @@ Item {
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
loginClicked() logoClicked()
} }
} }
} }

View File

@ -18,5 +18,4 @@ Item {
Component.onCompleted: { Component.onCompleted: {
visible = true visible = true
} }
} }

View File

@ -5,6 +5,7 @@ import FluentUI
Rectangle{ Rectangle{
readonly property string displayText : d._displayText readonly property string displayText : d._displayText
property bool disabled: false
property int from: 0 property int from: 0
property int to: 99 property int to: 99
property var validator: IntValidator { property var validator: IntValidator {
@ -27,6 +28,7 @@ Rectangle{
FluTextBox{ FluTextBox{
rightPadding: 80 rightPadding: 80
closeRightMargin: 55 closeRightMargin: 55
disabled: control.disabled
validator: control.validator validator: control.validator
text: d._displayText text: d._displayText
Component.onCompleted: { Component.onCompleted: {
@ -51,6 +53,7 @@ Rectangle{
anchors.fill: parent anchors.fill: parent
readOnly: true readOnly: true
rightPadding: 80 rightPadding: 80
disabled: control.disabled
text: control.displayText text: control.displayText
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
@ -68,8 +71,13 @@ Rectangle{
width: 20 width: 20
height: 20 height: 20
iconSize: 16 iconSize: 16
disabled: {
if(control.disabled===true){
return true
}
return Number(control.displayText) === control.to
}
iconSource: FluentIcons.ChevronUp iconSource: FluentIcons.ChevronUp
enabled: Number(control.displayText) !== control.to
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right
@ -102,8 +110,13 @@ Rectangle{
iconSource: FluentIcons.ChevronDown iconSource: FluentIcons.ChevronDown
width: 20 width: 20
height: 20 height: 20
disabled: {
if(control.disabled === true){
return true
}
return Number(control.displayText) === control.from
}
iconSize: 16 iconSize: 16
enabled: Number(control.displayText) !== control.from
anchors{ anchors{
verticalCenter: parent.verticalCenter verticalCenter: parent.verticalCenter
right: parent.right right: parent.right

View File

@ -452,7 +452,7 @@ Rectangle {
var minimumHeight = obj.minimumHeight var minimumHeight = obj.minimumHeight
var maximumHeight = obj.maximumHeight var maximumHeight = obj.maximumHeight
if(!minimumHeight){ if(!minimumHeight){
minimumHeight = 44 minimumHeight = 46
} }
if(!maximumHeight){ if(!maximumHeight){
maximumHeight = 65535 maximumHeight = 65535