Skip to content

Commit 7d96942

Browse files
committed
fix(popup): improve popup background with blur and palette
1. Add DTK palette binding for proper color integration 2. Split background into two Loaders for different popup types 3. Use StyledBehindWindowBlur for Popup.Window type 4. Retain FloatingPanel for non-window popup types Log: Enhance Popup to support window blur and DTK palette fix(popup): 改进弹出窗口背景模糊和调色板 1. 添加 DTK 调色板绑定以实现正确的颜色集成 2. 将背景拆分为两个加载器以适配不同的弹出窗口类型 3. 为 Popup.Window 类型使用 StyledBehindWindowBlur 模糊效果 4. 非窗口类型弹出窗口继续使用 FloatingPanel Log: 增强 Popup 组件,支持窗口模糊效果和 DTK 调色板
1 parent 28f892a commit 7d96942

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

qt6/src/qml/Popup.qml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,33 @@ import org.deepin.dtk.style 1.0 as DS
1111
T.Popup {
1212
id: control
1313

14+
palette: D.DTK.palette
15+
1416
property bool closeOnInactive: true
1517
readonly property bool active: parent && parent.Window.active
1618
implicitWidth: DS.Style.control.implicitWidth(control)
1719
implicitHeight: DS.Style.control.implicitHeight(control)
1820

1921
padding: DS.Style.popup.padding
2022

21-
background: Loader {
22-
active: control.popupType !== Popup.Window
23-
sourceComponent: FloatingPanel {
24-
implicitHeight: DS.Style.popup.height
25-
implicitWidth: DS.Style.popup.width
26-
radius: DS.Style.popup.radius
23+
background: Item {
24+
implicitWidth: DS.Style.control.implicitWidth(control)
25+
implicitHeight: DS.Style.control.implicitHeight(control)
26+
27+
Loader {
28+
anchors.fill: parent
29+
active: control.popupType === Popup.Window
30+
sourceComponent: D.StyledBehindWindowBlur { }
31+
}
32+
33+
Loader {
34+
anchors.fill: parent
35+
active: control.popupType !== Popup.Window
36+
sourceComponent: FloatingPanel {
37+
implicitHeight: DS.Style.popup.height
38+
implicitWidth: DS.Style.popup.width
39+
radius: DS.Style.popup.radius
40+
}
2741
}
2842
}
2943

0 commit comments

Comments
 (0)