From b617f547f4a55274efefaddcef7776975ee93dd4 Mon Sep 17 00:00:00 2001 From: Wang Zichong Date: Thu, 25 Jul 2024 14:59:11 +0800 Subject: [PATCH] chore(UI): fullscreen use behind window blur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 全屏启动器直接使用背景模糊。后续会继续调整到 treeland 模糊。 Log: --- qml/FullscreenFrame.qml | 4 +--- qml/Main.qml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/qml/FullscreenFrame.qml b/qml/FullscreenFrame.qml index a0c2b72e..9d3cc7ee 100644 --- a/qml/FullscreenFrame.qml +++ b/qml/FullscreenFrame.qml @@ -77,9 +77,7 @@ InputEventItem { repeat: false } - background: Image { - source: DesktopIntegration.backgroundUrl - + background: Item { Rectangle { anchors.fill: parent color: folderGridViewPopup.visible ? Qt.rgba(0, 0, 0, 0.6) : Qt.rgba(0, 0, 0, 0.5) diff --git a/qml/Main.qml b/qml/Main.qml index e1a8d6df..f28b44d1 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -302,6 +302,23 @@ QtObject { // Fullscreen mode: always assume dark theme DWindow.themeType: ApplicationHelper.DarkType + color: "transparent" + + StyledBehindWindowBlur { + control: parent + anchors.fill: parent + blendColor: { + if (valid) { + return DStyle.Style.control.selectColor(undefined, + Qt.rgba(235 / 255.0, 235 / 255.0, 235 / 255.0, windowedFrameWindow.blendColorAlpha(0.6)), + Qt.rgba(0, 0, 0, windowedFrameWindow.blendColorAlpha(85 / 255))) + } + return DStyle.Style.control.selectColor(undefined, + DStyle.Style.behindWindowBlur.lightNoBlurColor, + DStyle.Style.behindWindowBlur.darkNoBlurColor) + } + } + onVisibleChanged: { if (visible) { requestActivate()