Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
朱子楚\zhuzi committed Sep 23, 2023
1 parent f88b330 commit 7a17764
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
1 change: 0 additions & 1 deletion example/qml-Qt6/page/T_ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ FluScrollablePage{
}
FluComboBox {
editable: true
font:FluTextStyle.BodyStrong
model: ListModel {
id: model_2
ListElement { text: "Banana" }
Expand Down
1 change: 0 additions & 1 deletion example/qml/page/T_ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ FluScrollablePage{
}
FluComboBox {
editable: true
font:FluTextStyle.BodyStrong
model: ListModel {
id: model_2
ListElement { text: "Banana" }
Expand Down
3 changes: 2 additions & 1 deletion src/Qt5/imports/FluentUI/Controls/FluComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,6 +72,7 @@ ComboBox {
Keys.onReturnPressed:(event)=> handleCommit(event)
function handleCommit(event){
control.commit(control.editText)
accepted()
}
}

Expand Down
22 changes: 11 additions & 11 deletions src/Qt5/imports/FluentUI/Controls/FluItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
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)
Expand Down
3 changes: 2 additions & 1 deletion src/Qt6/imports/FluentUI/Controls/FluComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,6 +72,7 @@ ComboBox {
Keys.onReturnPressed:(event)=> handleCommit(event)
function handleCommit(event){
control.commit(control.editText)
accepted()
}
}

Expand Down
22 changes: 11 additions & 11 deletions src/Qt6/imports/FluentUI/Controls/FluItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
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)
Expand Down

0 comments on commit 7a17764

Please sign in to comment.