yxdy ff15075c79
Some checks are pending
Gallery App Build / macOS (push) Waiting to run
Gallery App Build / Windows (push) Waiting to run
Gallery App Build / Ubuntu (push) Waiting to run
修改样式
2025-03-07 16:23:09 +08:00

55 lines
1.4 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts
import QtQuick.Controls
import FluentUI.Controls
import FluentUI.impl
TextBox{
id: control
property var p_txt: "起"
property var p_tip_txt: "请输入起点"
property var p_del: false
signal clickClose()
Layout.preferredWidth: parent.width
Layout.preferredHeight: 32
placeholderText: control.p_tip_txt
leading: Label{
text: control.p_txt
color: "#fff"
}
trailing: IconButton{
implicitWidth: 20
implicitHeight: 20
icon.name: FluentIcons.graph_ChromeClose
icon.width: 10
icon.height: 10
padding: 0
visible: p_del
onClicked: {
control.clickClose()
}
}
placeholderTextColor: "#888"
background: InputBackground {
implicitWidth: 200
implicitHeight: 32
activeColor: "#22C55E"
radius: 6
color: {
if(!parent.enabled){
return parent.FluentUI.theme.res.controlFillColorDisabled
}else if(parent.activeFocus){
return parent.FluentUI.theme.res.controlFillColorInputActive
}else if(parent.hovered){
return parent.FluentUI.theme.res.controlFillColorSecondary
}else{
return parent.FluentUI.theme.res.controlFillColorDefault
}
}
target: parent
}
}