Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkdeclarative
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#395
  • Loading branch information
deepin-ci-robot committed Dec 9, 2024
1 parent 4932134 commit 63d8054
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qt6/src/qml/CheckDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ T.CheckDelegate {
implicitHeight: DS.Style.itemDelegate.height
Rectangle {
anchors.fill: parent
visible: !checked && !control.ListView.view
visible: !control.checked && !D.DTK.hasAnimation && control.hovered
color: control.D.ColorSelector.backgroundColor
radius: DS.Style.control.radius
}
Expand Down
6 changes: 6 additions & 0 deletions qt6/src/qml/ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ T.ComboBox {
property bool showAlert
property int maxVisibleItems : DS.Style.comboBox.maxVisibleItems
property D.Palette separatorColor: DS.Style.comboBox.edit.separator
property var horizontalAlignment: control.flat ? Text.AlignRight : Text.AlignLeft

editable: true


implicitWidth: DS.Style.control.implicitWidth(control)
implicitHeight: DS.Style.control.implicitHeight(control)
Expand Down Expand Up @@ -103,6 +107,7 @@ T.ComboBox {
T.TextField {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.rightMargin: DS.Style.comboBox.spacing
text: control.editable ? control.editText : control.displayText

enabled: control.editable
Expand All @@ -116,6 +121,7 @@ T.ComboBox {
selectionColor: control.palette.highlight
selectedTextColor: control.palette.highlightedText
verticalAlignment: Text.AlignVCenter
horizontalAlignment: control.horizontalAlignment
}
}

Expand Down
2 changes: 1 addition & 1 deletion qt6/src/qml/ItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ T.ItemDelegate {

Loader {
anchors.fill: parent
active: !checked && control.normalBackgroundVisible
active: !checked && control.normalBackgroundVisible && !D.DTK.hasAnimation && control.hovered
sourceComponent: D.RoundRectangle {
color: DS.Style.itemDelegate.normalColor
radius: DS.Style.control.radius
Expand Down

0 comments on commit 63d8054

Please sign in to comment.