diff --git a/assets/qml/Dashboard/WidgetDelegate.qml b/assets/qml/Dashboard/WidgetDelegate.qml index 7e7bdb13..f2bc64ef 100644 --- a/assets/qml/Dashboard/WidgetDelegate.qml +++ b/assets/qml/Dashboard/WidgetDelegate.qml @@ -76,7 +76,7 @@ Item { isExternalWindow: true widgetIndex: root.widgetIndex widgetVisible: externalWindow.visible - anchors.margins: externalWindow.margin + anchors.margins: externalWindow.shadowMargin anchors.topMargin: externalWindow.titlebar.height MouseArea { diff --git a/assets/qml/FramelessWindow/CustomWindow.qml b/assets/qml/FramelessWindow/CustomWindow.qml index a7c168b2..b33a199b 100644 --- a/assets/qml/FramelessWindow/CustomWindow.qml +++ b/assets/qml/FramelessWindow/CustomWindow.qml @@ -40,7 +40,7 @@ Window { // // Window radius control // - readonly property int handleSize: radius + 5 + margin + readonly property int handleSize: radius + 5 + shadowMargin readonly property int radius: ((root.visibility === Window.Maximized && maximizeEnabled) || fullScreen) ? 0 : 10 // @@ -70,10 +70,14 @@ Window { // property alias titlebar: border + // + // Size of the shadow object + // + property int shadowMargin: root.radius > 0 ? 20 : 0 + // // Background color of the window & the titlebar // - property int margin: root.radius > 0 ? 10 : 0 property color borderColor: Cpp_ThemeManager.highlight property color backgroundColor: Cpp_ThemeManager.window property color titlebarText: Cpp_ThemeManager.brightText @@ -95,14 +99,14 @@ Window { spread: 0.2 anchors.fill: bg color: Qt.rgba(0,0,0,0.5) - glowRadius: root.margin / 2 + glowRadius: root.shadowMargin / 2 cornerRadius: bg.radius + glowRadius } Rectangle { id: bg color: "transparent" radius: root.radius anchors.fill: parent - anchors.margins: root.margin + anchors.margins: root.shadowMargin } // @@ -115,7 +119,7 @@ Window { radius: root.radius color: "transparent" anchors.fill: parent - anchors.margins: root.margin - 1 + anchors.margins: root.shadowMargin - 1 border.color: root.borderColor } @@ -138,7 +142,7 @@ Window { top: parent.top left: parent.left right: parent.right - margins: root.margin + margins: root.shadowMargin } } diff --git a/assets/qml/Windows/About.qml b/assets/qml/Windows/About.qml index 1363ac8f..30de65e6 100644 --- a/assets/qml/Windows/About.qml +++ b/assets/qml/Windows/About.qml @@ -43,10 +43,10 @@ FramelessWindow.CustomWindow { height: minimumHeight x: (Screen.desktopAvailableWidth - width) / 2 y: (Screen.desktopAvailableHeight - height) / 2 - minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin - maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin + minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin + maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin // // Titlebar options @@ -65,8 +65,8 @@ FramelessWindow.CustomWindow { Page { anchors { fill: parent - margins: root.margin - topMargin: titlebar.height + root.margin + margins: root.shadowMargin + topMargin: titlebar.height + root.shadowMargin } palette.text: Cpp_ThemeManager.text diff --git a/assets/qml/Windows/Acknowledgements.qml b/assets/qml/Windows/Acknowledgements.qml index 7f4da85a..69967a8e 100644 --- a/assets/qml/Windows/Acknowledgements.qml +++ b/assets/qml/Windows/Acknowledgements.qml @@ -45,10 +45,10 @@ FramelessWindow.CustomWindow { y: (Screen.desktopAvailableHeight - height) / 2 titlebarColor: Cpp_ThemeManager.dialogBackground backgroundColor: Cpp_ThemeManager.dialogBackground - minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin - maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin + minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin + maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin // // Use page item to set application palette @@ -56,8 +56,8 @@ FramelessWindow.CustomWindow { Page { anchors { fill: parent - margins: root.margin - topMargin: titlebar.height + root.margin + margins: root.shadowMargin + topMargin: titlebar.height + root.shadowMargin } palette.text: Cpp_ThemeManager.text diff --git a/assets/qml/Windows/CsvPlayer.qml b/assets/qml/Windows/CsvPlayer.qml index 00858b9d..0b7912fd 100644 --- a/assets/qml/Windows/CsvPlayer.qml +++ b/assets/qml/Windows/CsvPlayer.qml @@ -45,10 +45,10 @@ FramelessWindow.CustomWindow { y: (Screen.desktopAvailableHeight - height) / 2 titlebarColor: Cpp_ThemeManager.dialogBackground backgroundColor: Cpp_ThemeManager.dialogBackground - minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin - maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin + minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin + maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin // // Close CSV file when window is closed @@ -64,8 +64,8 @@ FramelessWindow.CustomWindow { Page { anchors { fill: parent - margins: root.margin - topMargin: titlebar.height + root.margin + margins: root.shadowMargin + topMargin: titlebar.height + root.shadowMargin } palette.text: Cpp_ThemeManager.text diff --git a/assets/qml/Windows/Donate.qml b/assets/qml/Windows/Donate.qml index b7c7e2dc..9376aca3 100644 --- a/assets/qml/Windows/Donate.qml +++ b/assets/qml/Windows/Donate.qml @@ -46,10 +46,10 @@ FramelessWindow.CustomWindow { y: (Screen.desktopAvailableHeight - height) / 2 titlebarColor: Cpp_ThemeManager.dialogBackground backgroundColor: Cpp_ThemeManager.dialogBackground - minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.margin - minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin - maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.margin + minimumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + maximumWidth: column.implicitWidth + 4 * app.spacing + 2 * root.shadowMargin + minimumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin + maximumHeight: column.implicitHeight + 4 * app.spacing + titlebar.height + 2 * root.shadowMargin // // Custom properties @@ -95,8 +95,8 @@ FramelessWindow.CustomWindow { Page { anchors { fill: parent - margins: root.margin - topMargin: titlebar.height + root.margin + margins: root.shadowMargin + topMargin: titlebar.height + root.shadowMargin } palette.text: Cpp_ThemeManager.text diff --git a/assets/qml/Windows/JsonEditor.qml b/assets/qml/Windows/JsonEditor.qml index 6629d4b0..377bc472 100644 --- a/assets/qml/Windows/JsonEditor.qml +++ b/assets/qml/Windows/JsonEditor.qml @@ -78,11 +78,11 @@ FramelessWindow.CustomWindow { Page { clip: true anchors.fill: parent - anchors.margins: root.margin + anchors.margins: root.shadowMargin palette.text: Cpp_ThemeManager.text palette.buttonText: Cpp_ThemeManager.text palette.windowText: Cpp_ThemeManager.text - anchors.topMargin: titlebar.height + root.margin + anchors.topMargin: titlebar.height + root.shadowMargin palette.window: Cpp_ThemeManager.dialogBackground background: Rectangle { diff --git a/assets/qml/Windows/MainWindow.qml b/assets/qml/Windows/MainWindow.qml index 2ea9d06b..c31fb3a3 100644 --- a/assets/qml/Windows/MainWindow.qml +++ b/assets/qml/Windows/MainWindow.qml @@ -136,9 +136,9 @@ FramelessWindow.CustomWindow { title: Cpp_AppName width: minimumWidth height: minimumHeight - minimumWidth: 1250 + 2 * root.margin + minimumWidth: 1250 + 2 * root.shadowMargin backgroundColor: Cpp_ThemeManager.windowBackground - minimumHeight: 720 + 2 * root.margin + root.titlebar.height + minimumHeight: 720 + 2 * root.shadowMargin + root.titlebar.height // // Startup code @@ -251,11 +251,11 @@ FramelessWindow.CustomWindow { Page { clip: true anchors.fill: parent - anchors.margins: root.margin + anchors.margins: root.shadowMargin palette.text: Cpp_ThemeManager.text palette.buttonText: Cpp_ThemeManager.text palette.windowText: Cpp_ThemeManager.text - anchors.topMargin: titlebar.height + root.margin + anchors.topMargin: titlebar.height + root.shadowMargin background: Rectangle { radius: root.radius