From cb50c31e1e697c8a266d83a153896c559bcf09d6 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Mon, 17 Jul 2023 09:25:12 +0800 Subject: [PATCH] update --- example/qml/page/T_ComboBox.qml | 1 + src/imports/FluentUI/Controls/FluComboBox.qml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/qml/page/T_ComboBox.qml b/example/qml/page/T_ComboBox.qml index d8b1f448..15fba70b 100644 --- a/example/qml/page/T_ComboBox.qml +++ b/example/qml/page/T_ComboBox.qml @@ -46,6 +46,7 @@ FluScrollablePage{ } FluComboBox { editable: true + font:FluTextStyle.BodyStrong model: ListModel { id: model_2 ListElement { text: "Banana" } diff --git a/src/imports/FluentUI/Controls/FluComboBox.qml b/src/imports/FluentUI/Controls/FluComboBox.qml index b85f4560..fd7bff65 100644 --- a/src/imports/FluentUI/Controls/FluComboBox.qml +++ b/src/imports/FluentUI/Controls/FluComboBox.qml @@ -16,7 +16,7 @@ ComboBox { implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding, implicitIndicatorHeight + topPadding + bottomPadding) - + font: FluTextStyle.Body leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing) enabled: !disabled @@ -24,6 +24,7 @@ ComboBox { width: ListView.view.width text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData palette.text: control.palette.text + font: control.font palette.highlightedText: control.palette.highlightedText highlighted: control.highlightedIndex === index hoverEnabled: control.hoverEnabled @@ -49,7 +50,7 @@ ComboBox { text: control.editable ? control.editText : control.displayText enabled: control.editable autoScroll: control.editable - font:FluTextStyle.Body + font:control.font readOnly: control.down color: FluTheme.dark ? Qt.rgba(255/255,255/255,255/255,1) : Qt.rgba(27/255,27/255,27/255,1) inputMethodHints: control.inputMethodHints