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#462
  • Loading branch information
deepin-ci-robot authored and 18202781743 committed Feb 24, 2025
1 parent 5f0458a commit 664051a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
5 changes: 5 additions & 0 deletions qt6/src/qml/ComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ T.ComboBox {
}
}
}
Loader {
anchors.fill: parent
active: control.flat && control.visualFocus
sourceComponent: FocusBoxBorder {}
}
}

popup: Popup {
Expand Down
4 changes: 2 additions & 2 deletions qt6/src/qml/FocusBoxBorder.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import org.deepin.dtk.style 1.0 as DS

Item {
id: control
property color color: "transparent"
property color color: palette.highlight
property real borderWidth: DS.Style.control.focusBorderWidth
property real radius: 0
property real radius: DS.Style.control.radius

Rectangle {
id: _border
Expand Down
6 changes: 6 additions & 0 deletions qt6/src/qml/Slider.qml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ T.Slider {
palette: D.DTK.makeIconPalette(control.palette)
mode: control.D.ColorSelector.controlState
theme: control.D.ColorSelector.controlTheme

Loader {
anchors.fill: parent
active: control.visualFocus
sourceComponent: FocusBoxBorder {}
}
}

// draw panel
Expand Down
5 changes: 5 additions & 0 deletions qt6/src/qml/Switch.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,9 @@ T.Switch {
text: control.text
verticalAlignment: Text.AlignVCenter
}

background: Loader {
active: control.visualFocus
sourceComponent: FocusBoxBorder {}
}
}

0 comments on commit 664051a

Please # to comment.