diff --git a/assets/qml/Dashboard/WidgetDelegate.qml b/assets/qml/Dashboard/WidgetDelegate.qml index f2bc64ef..8fddbdc1 100644 --- a/assets/qml/Dashboard/WidgetDelegate.qml +++ b/assets/qml/Dashboard/WidgetDelegate.qml @@ -64,20 +64,49 @@ Item { id: externalWindow minimumWidth: 640 minimumHeight: 480 - titlebarBorderEnabled: false title: externalLoader.widgetTitle titlebarText: Cpp_ThemeManager.text titlebarColor: Cpp_ThemeManager.widgetWindowBackground backgroundColor: Cpp_ThemeManager.widgetWindowBackground - WidgetLoader { - id: externalLoader + Rectangle { + clip: true anchors.fill: parent - isExternalWindow: true - widgetIndex: root.widgetIndex - widgetVisible: externalWindow.visible + radius: externalWindow.radius anchors.margins: externalWindow.shadowMargin - anchors.topMargin: externalWindow.titlebar.height + color: Cpp_ThemeManager.widgetWindowBackground + anchors.topMargin: externalWindow.titlebar.height + externalWindow.shadowMargin + + Item { + anchors.fill: parent + + DragHandler { + grabPermissions: TapHandler.CanTakeOverFromAnything + onActiveChanged: { + if (active) + externalWindow.startSystemMove() + } + } + } + + Rectangle { + height: externalWindow.radius + color: Cpp_ThemeManager.widgetWindowBackground + anchors { + top: parent.top + left: parent.left + right: parent.right + } + } + + WidgetLoader { + id: externalLoader + anchors.fill: parent + isExternalWindow: true + widgetIndex: root.widgetIndex + widgetVisible: externalWindow.visible + anchors.margins: externalWindow.radius + } MouseArea { hoverEnabled: true diff --git a/assets/qml/FramelessWindow/CustomWindow.qml b/assets/qml/FramelessWindow/CustomWindow.qml index db64db58..bf927486 100644 --- a/assets/qml/FramelessWindow/CustomWindow.qml +++ b/assets/qml/FramelessWindow/CustomWindow.qml @@ -90,7 +90,6 @@ Window { property alias closeEnabled: border.closeEnabled property alias minimizeEnabled: border.minimizeEnabled property alias maximizeEnabled: border.maximizeEnabled - property alias titlebarBorderEnabled: border.titlebarBorderEnabled // // Shadow implementation diff --git a/assets/qml/FramelessWindow/WindowBorder.qml b/assets/qml/FramelessWindow/WindowBorder.qml index c6f21abe..590fbb81 100644 --- a/assets/qml/FramelessWindow/WindowBorder.qml +++ b/assets/qml/FramelessWindow/WindowBorder.qml @@ -42,12 +42,11 @@ Rectangle { // Window controls // property Window window + property bool displayIcon: true property bool fullScreen: false property bool closeEnabled: true property bool minimizeEnabled: true property bool maximizeEnabled: true - property bool displayIcon: true - property bool titlebarBorderEnabled: true property color textColor: palette.text readonly property bool showMacControls: Cpp_IsMac @@ -95,21 +94,6 @@ Rectangle { } } - // - // Bottom titlebar border - // - Rectangle { - height: 1 - visible: root.titlebarBorderEnabled - color: Qt.darker(parent.color, 1.5) - - anchors { - left: parent.left - right: parent.right - bottom: parent.bottom - } - } - // // Window drag handler // diff --git a/assets/qml/JsonEditor/Header.qml b/assets/qml/JsonEditor/Header.qml index 64f1a1cd..f4d8f5a7 100644 --- a/assets/qml/JsonEditor/Header.qml +++ b/assets/qml/JsonEditor/Header.qml @@ -32,11 +32,32 @@ Rectangle { // // Background & border // - border.width: 1 - border.color: Cpp_ThemeManager.toolbarGradient1 - gradient: Gradient { - GradientStop { position: 0; color: Cpp_ThemeManager.toolbarGradient1 } - GradientStop { position: 1; color: Cpp_ThemeManager.toolbarGradient2 } + Rectangle { + id: bg + anchors.fill: parent + + gradient: Gradient { + GradientStop { position: 0; color: Cpp_ThemeManager.toolbarGradient1 } + GradientStop { position: 1; color: Cpp_ThemeManager.toolbarGradient2 } + } + + Rectangle { + border.width: 1 + anchors.fill: parent + color: "transparent" + border.color: Qt.darker(Cpp_ThemeManager.toolbarGradient2, 1.5) + } + + Rectangle { + height: 1 + color: Qt.darker(Cpp_ThemeManager.toolbarGradient1, 1.5) + + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + } } // diff --git a/assets/qml/Panes/Toolbar.qml b/assets/qml/Panes/Toolbar.qml index b4a0dbb8..135d9eac 100644 --- a/assets/qml/Panes/Toolbar.qml +++ b/assets/qml/Panes/Toolbar.qml @@ -86,10 +86,23 @@ Control { } // - // Background gradient + // Background gradient + border // Rectangle { id: bg + anchors.fill: parent + + gradient: Gradient { + GradientStop { position: 0; color: Cpp_ThemeManager.toolbarGradient1 } + GradientStop { position: 1; color: Cpp_ThemeManager.toolbarGradient2 } + } + + Rectangle { + border.width: 1 + anchors.fill: parent + color: "transparent" + border.color: Qt.darker(Cpp_ThemeManager.toolbarGradient2, 1.5) + } Rectangle { height: 1 @@ -101,17 +114,6 @@ Control { bottom: parent.bottom } } - - gradient: Gradient { - GradientStop { position: 0; color: Cpp_ThemeManager.toolbarGradient1 } - GradientStop { position: 1; color: Cpp_ThemeManager.toolbarGradient2 } - } - - anchors { - fill: parent - leftMargin: -border.width * 10 - rightMargin: -border.width * 10 - } } // diff --git a/assets/qml/Windows/About.qml b/assets/qml/Windows/About.qml index 30de65e6..9ea39e81 100644 --- a/assets/qml/Windows/About.qml +++ b/assets/qml/Windows/About.qml @@ -51,10 +51,9 @@ FramelessWindow.CustomWindow { // // Titlebar options // + displayIcon: false minimizeEnabled: false maximizeEnabled: false - displayIcon: false - titlebarBorderEnabled: false titlebarText: Cpp_ThemeManager.text titlebarColor: Cpp_ThemeManager.dialogBackground backgroundColor: Cpp_ThemeManager.dialogBackground diff --git a/assets/qml/Windows/Acknowledgements.qml b/assets/qml/Windows/Acknowledgements.qml index 69967a8e..7da699d9 100644 --- a/assets/qml/Windows/Acknowledgements.qml +++ b/assets/qml/Windows/Acknowledgements.qml @@ -33,13 +33,12 @@ FramelessWindow.CustomWindow { // // Window options // - title: qsTr("Acknowledgements") + displayIcon: false width: minimumWidth height: minimumHeight minimizeEnabled: false maximizeEnabled: false - displayIcon: false - titlebarBorderEnabled: false + title: qsTr("Acknowledgements") titlebarText: Cpp_ThemeManager.text x: (Screen.desktopAvailableWidth - width) / 2 y: (Screen.desktopAvailableHeight - height) / 2 diff --git a/assets/qml/Windows/CsvPlayer.qml b/assets/qml/Windows/CsvPlayer.qml index 578dc677..7416f6cb 100644 --- a/assets/qml/Windows/CsvPlayer.qml +++ b/assets/qml/Windows/CsvPlayer.qml @@ -33,13 +33,12 @@ FramelessWindow.CustomWindow { // // Window options // - title: qsTr("CSV Player") + displayIcon: false width: minimumWidth height: minimumHeight minimizeEnabled: false maximizeEnabled: false - displayIcon: false - titlebarBorderEnabled: false + title: qsTr("CSV Player") titlebarText: Cpp_ThemeManager.text x: (Screen.desktopAvailableWidth - width) / 2 y: (Screen.desktopAvailableHeight - height) / 2 diff --git a/assets/qml/Windows/Donate.qml b/assets/qml/Windows/Donate.qml index 1efa5f49..6ff41385 100644 --- a/assets/qml/Windows/Donate.qml +++ b/assets/qml/Windows/Donate.qml @@ -34,13 +34,12 @@ FramelessWindow.CustomWindow { // // Window options // + displayIcon: false title: qsTr("Donate") width: minimumWidth height: minimumHeight minimizeEnabled: false maximizeEnabled: false - displayIcon: false - titlebarBorderEnabled: false titlebarText: Cpp_ThemeManager.text x: (Screen.desktopAvailableWidth - width) / 2 y: (Screen.desktopAvailableHeight - height) / 2 diff --git a/assets/qml/Windows/JsonEditor.qml b/assets/qml/Windows/JsonEditor.qml index 377bc472..6c5b3ebd 100644 --- a/assets/qml/Windows/JsonEditor.qml +++ b/assets/qml/Windows/JsonEditor.qml @@ -40,7 +40,7 @@ FramelessWindow.CustomWindow { minimumWidth: 910 minimumHeight: 720 displayIcon: false - borderColor: Cpp_ThemeManager.toolbarGradient1 + borderColor: Qt.darker(Cpp_ThemeManager.toolbarGradient2, 1.5) title: qsTr("JSON Editor - %1").arg(Cpp_JSON_Editor.jsonFileName) // diff --git a/assets/qml/Windows/MainWindow.qml b/assets/qml/Windows/MainWindow.qml index 75331bec..936de8af 100644 --- a/assets/qml/Windows/MainWindow.qml +++ b/assets/qml/Windows/MainWindow.qml @@ -37,7 +37,7 @@ import "../PlatformDependent" as PlatformDependent FramelessWindow.CustomWindow { id: root onClosed: Qt.quit() - borderColor: Cpp_ThemeManager.toolbarGradient1 + borderColor: Qt.darker(Cpp_ThemeManager.toolbarGradient2, 1.5) // // Global properties