Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions qt6/src/qml/Popup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,33 @@ import org.deepin.dtk.style 1.0 as DS
T.Popup {
id: control

palette: D.DTK.palette

property bool closeOnInactive: true
readonly property bool active: parent && parent.Window.active
implicitWidth: DS.Style.control.implicitWidth(control)
implicitHeight: DS.Style.control.implicitHeight(control)

padding: DS.Style.popup.padding

background: Loader {
active: control.popupType !== Popup.Window
sourceComponent: FloatingPanel {
implicitHeight: DS.Style.popup.height
implicitWidth: DS.Style.popup.width
radius: DS.Style.popup.radius
background: Item {
implicitWidth: DS.Style.control.implicitWidth(control)
implicitHeight: DS.Style.control.implicitHeight(control)

Loader {
anchors.fill: parent
active: control.popupType === Popup.Window
sourceComponent: D.StyledBehindWindowBlur { }
}

Loader {
anchors.fill: parent
active: control.popupType !== Popup.Window
sourceComponent: FloatingPanel {
implicitHeight: DS.Style.popup.height
implicitWidth: DS.Style.popup.width
radius: DS.Style.popup.radius
}
}
}

Expand Down
Loading