From adf09ccd158d8766db8dd2bf7ea82fa976c8f2b0 Mon Sep 17 00:00:00 2001 From: Alex Spataru Date: Tue, 9 Nov 2021 14:55:26 -0600 Subject: [PATCH] Nicer shadow implementation --- assets/qml/FramelessWindow/CustomWindow.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/qml/FramelessWindow/CustomWindow.qml b/assets/qml/FramelessWindow/CustomWindow.qml index 74f12ef9..a7c168b2 100644 --- a/assets/qml/FramelessWindow/CustomWindow.qml +++ b/assets/qml/FramelessWindow/CustomWindow.qml @@ -50,8 +50,9 @@ Window { property bool windowMaximized: false property bool windowMinimized: false property alias fullScreen: border.fullScreen - readonly property int customFlags: Qt.FramelessWindowHint | - Qt.WindowMinMaxButtonsHint + readonly property int customFlags: Qt.CustomizeWindowHint | + Qt.FramelessWindowHint | + Qt.NoDropShadowWindowHint // // Toggle fullscreen state @@ -91,9 +92,11 @@ Window { // Shadow implementation // RectangularGlow { + spread: 0.2 anchors.fill: bg - glowRadius: root.margin - color: Qt.rgba(0,0,0,0.1) + color: Qt.rgba(0,0,0,0.5) + glowRadius: root.margin / 2 + cornerRadius: bg.radius + glowRadius } Rectangle { id: bg color: "transparent"