From eda65a9948b9757c85e7d54a7f5a6a3ddea60fa1 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Thu, 7 Aug 2025 21:17:28 -0400 Subject: [PATCH] Removed borders as they are hard to manage + scaling issues --- Bar/Bar.qml | 11 ----- Bar/Modules/ActiveWindow.qml | 79 ++++++++++++-------------------- Widgets/SidePanel/PanelPopup.qml | 36 ++++----------- 3 files changed, 40 insertions(+), 86 deletions(-) diff --git a/Bar/Bar.qml b/Bar/Bar.qml index ab31d3f..f5e5953 100644 --- a/Bar/Bar.qml +++ b/Bar/Bar.qml @@ -51,19 +51,8 @@ Scope { color: Theme.backgroundPrimary anchors.top: parent.top anchors.left: parent.left - - Rectangle { - anchors.bottom: parent.bottom - width: parent.width - height: 1 - color: "transparent" - border.color: Theme.outline || "#444" - border.width: 1 - } } - - Row { id: leftWidgetsRow diff --git a/Bar/Modules/ActiveWindow.qml b/Bar/Modules/ActiveWindow.qml index 67c2f8a..00c2f9c 100644 --- a/Bar/Modules/ActiveWindow.qml +++ b/Bar/Modules/ActiveWindow.qml @@ -104,62 +104,43 @@ PanelWindow { Rectangle { id: activeWindowTitleContainer - color: "transparent" - - + color: Theme.backgroundPrimary width: Math.min(barBackground.width - 200, activeWindowTitle.implicitWidth + (Settings.settings.showActiveWindowIcon ? 28 : 22)) + 16 height: activeWindowTitle.implicitHeight + 12 - anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter + bottomLeftRadius: Math.max(0, width / 2) + bottomRightRadius: Math.max(0, width / 2) - Rectangle { - id: innerRect + IconImage { + id: icon + width: 12 + height: 12 + anchors.left: parent.left + anchors.leftMargin: 14 + anchors.verticalCenter: parent.verticalCenter + source: ToplevelManager?.activeToplevel ? getIcon() : "" + visible: Settings.settings.showActiveWindowIcon + anchors.verticalCenterOffset: -3 - bottomLeftRadius: Math.max(0, width / 2) - bottomRightRadius: Math.max(0, width / 2) - color: Theme.backgroundPrimary - anchors { - fill: parent - leftMargin: 0 - rightMargin: 0 - topMargin: -1 - bottomMargin: 0 - } - - - border.color: Theme.outline || "#444"; - border.width: 1; - - IconImage { - id: icon - width: 12 - height: 12 - anchors.left: parent.left - anchors.leftMargin: 14 - anchors.verticalCenter: parent.verticalCenter - source: ToplevelManager?.activeToplevel ? getIcon() : "" - visible: Settings.settings.showActiveWindowIcon - anchors.verticalCenterOffset: -3 - - } - - Text { - id: activeWindowTitle - text: ToplevelManager?.activeToplevel?.title && ToplevelManager?.activeToplevel?.title.length > 60 ? ToplevelManager?.activeToplevel?.title.substring(0, 60) + "..." : ToplevelManager?.activeToplevel?.title || "" - font.pixelSize: 12 * Theme.scale(Screen) - color: Theme.textSecondary - anchors.left: icon.right - anchors.leftMargin: Settings.settings.showActiveWindowIcon ? 4 : 6 - anchors.right: parent.right - anchors.rightMargin: 14 - anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenterOffset: -3 - horizontalAlignment: Settings.settings.showActiveWindowIcon ? Text.AlignRight : Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - maximumLineCount: 1 - } } + + Text { + id: activeWindowTitle + text: ToplevelManager?.activeToplevel?.title && ToplevelManager?.activeToplevel?.title.length > 60 ? ToplevelManager?.activeToplevel?.title.substring(0, 60) + "..." : ToplevelManager?.activeToplevel?.title || "" + font.pixelSize: 12 * Theme.scale(Screen) + color: Theme.textSecondary + anchors.left: icon.right + anchors.leftMargin: Settings.settings.showActiveWindowIcon ? 4 : 6 + anchors.right: parent.right + anchors.rightMargin: 14 + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: -3 + horizontalAlignment: Settings.settings.showActiveWindowIcon ? Text.AlignRight : Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + maximumLineCount: 1 + } + } } } diff --git a/Widgets/SidePanel/PanelPopup.qml b/Widgets/SidePanel/PanelPopup.qml index 853f57a..ac8c100 100644 --- a/Widgets/SidePanel/PanelPopup.qml +++ b/Widgets/SidePanel/PanelPopup.qml @@ -42,9 +42,6 @@ PanelWithOverlay { // Access the shell's SettingsWindow instead of creating a new one id: sidebarPopupRect - // Necessary for the scaling to work on smaller screens - width: 530 - property real slideOffset: width property bool isAnimating: false property int leftPadding: 20 * Theme.scale(Screen) @@ -116,6 +113,8 @@ PanelWithOverlay { isRecording = false; } + // Necessary for the scaling to work on smaller screens + width: 526 implicitWidth: 500 * Theme.scale(Screen) implicitHeight: 700 * Theme.scale(Screen) visible: parent.visible @@ -173,37 +172,22 @@ PanelWithOverlay { Rectangle { id: mainRectangle - color: "transparent" anchors.top: sidebarPopupRect.top width: sidebarPopupRect.width - sidebarPopupRect.leftPadding height: sidebarPopupRect.height - sidebarPopupRect.bottomPadding x: sidebarPopupRect.leftPadding + sidebarPopupRect.slideOffset y: 0 z: 0 + color: Theme.backgroundPrimary + anchors.fill: parent + bottomLeftRadius: 20 * Theme.scale(Screen) - Rectangle { - color: Theme.backgroundPrimary - anchors.fill: parent - bottomLeftRadius: 20 * Theme.scale(Screen) - border.color: Theme.outline || "#444" - border.width: 1 - - anchors { - fill: parent - leftMargin: 0 - rightMargin: -1 - topMargin: -1 - bottomMargin: 0 - } - - Behavior on x { - enabled: !sidebarPopupRect.isAnimating - - NumberAnimation { - duration: 300 - easing.type: Easing.OutCubic - } + Behavior on x { + enabled: !sidebarPopupRect.isAnimating + NumberAnimation { + duration: 300 + easing.type: Easing.OutCubic } }