From b8c163aa8722a2b9f1c5c1ee72c744be07ba47c0 Mon Sep 17 00:00:00 2001 From: cutefishd Date: Fri, 7 May 2021 11:05:52 +0800 Subject: [PATCH] Fix window background --- qml/main.qml | 57 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/qml/main.qml b/qml/main.qml index 9e77165..66ed06a 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -18,18 +18,13 @@ Item { enabled: true } - DockBackground { + // Background + Rectangle { + id: _background anchors.fill: parent - radius: root.windowRadius - opacity: FishUI.Theme.darkMode ? 0.3 : 0.4 + radius: windowRadius color: FishUI.Theme.backgroundColor - - Behavior on opacity { - NumberAnimation { - duration: 200 - easing.type: Easing.Linear - } - } + opacity: FishUI.Theme.darkMode ? 0.3 : 0.4 Behavior on color { ColorAnimation { @@ -39,6 +34,48 @@ Item { } } + Rectangle { + anchors.fill: parent + color: "transparent" + radius: windowRadius + border.width: 1 + border.color: Qt.rgba(0, 0, 0, 0.3) + antialiasing: true + smooth: true + } + + Rectangle { + anchors.fill: parent + anchors.margins: 1 + radius: windowRadius - 1 + color: "transparent" + border.width: 1 + border.color: Qt.rgba(255, 255, 255, 0.1) + antialiasing: true + smooth: true + } + +// DockBackground { +// anchors.fill: parent +// radius: root.windowRadius +// opacity: FishUI.Theme.darkMode ? 0.3 : 0.4 +// color: FishUI.Theme.backgroundColor + +// Behavior on opacity { +// NumberAnimation { +// duration: 200 +// easing.type: Easing.Linear +// } +// } + +// Behavior on color { +// ColorAnimation { +// duration: 200 +// easing.type: Easing.Linear +// } +// } +// } + FishUI.WindowShadow { view: mainWindow geometry: Qt.rect(root.x, root.y, root.width, root.height)