This commit is contained in:
朱子楚\zhuzi 2023-09-23 15:55:29 +08:00
parent f88b330f8e
commit 7a1776407f
6 changed files with 26 additions and 26 deletions

View File

@ -46,7 +46,6 @@ FluScrollablePage{
}
FluComboBox {
editable: true
font:FluTextStyle.BodyStrong
model: ListModel {
id: model_2
ListElement { text: "Banana" }

View File

@ -47,7 +47,6 @@ FluScrollablePage{
}
FluComboBox {
editable: true
font:FluTextStyle.BodyStrong
model: ListModel {
id: model_2
ListElement { text: "Banana" }

View File

@ -4,7 +4,7 @@ import QtQuick.Window 2.15
import FluentUI 1.0
import QtQuick.Templates 2.15 as T
ComboBox {
T.ComboBox {
id: control
signal commit(string text)
property bool disabled: false
@ -72,6 +72,7 @@ ComboBox {
Keys.onReturnPressed:(event)=> handleCommit(event)
function handleCommit(event){
control.commit(control.editText)
accepted()
}
}

View File

@ -4,28 +4,28 @@ import FluentUI 1.0
T.ItemDelegate {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
padding: 12
spacing: 8
icon.width: 24
icon.height: 24
padding: 0
verticalPadding: 8
horizontalPadding: 10
icon.color: control.palette.text
contentItem:FluText {
text: control.text
font: control.font
color:{
if(control.down){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
implicitHeight: 30
color:{
if(FluTheme.dark){
return Qt.rgba(1,1,1,0.05)

View File

@ -4,7 +4,7 @@ import QtQuick.Controls.Basic
import FluentUI
import QtQuick.Templates as T
ComboBox {
T.ComboBox {
id: control
signal commit(string text)
property bool disabled: false
@ -72,6 +72,7 @@ ComboBox {
Keys.onReturnPressed:(event)=> handleCommit(event)
function handleCommit(event){
control.commit(control.editText)
accepted()
}
}

View File

@ -5,28 +5,28 @@ import FluentUI
T.ItemDelegate {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding,
implicitIndicatorHeight + topPadding + bottomPadding)
padding: 12
spacing: 8
icon.width: 24
icon.height: 24
padding: 0
verticalPadding: 8
horizontalPadding: 10
icon.color: control.palette.text
contentItem:FluText {
text: control.text
font: control.font
color:{
if(control.down){
return FluTheme.dark ? FluColors.Grey80 : FluColors.Grey120
}
return FluTheme.dark ? FluColors.White : FluColors.Grey220
}
}
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
implicitHeight: 30
color:{
if(FluTheme.dark){
return Qt.rgba(1,1,1,0.05)