diff --git a/Widgets/TopBar.qml b/Widgets/TopBar.qml index 165bb15f..272a7133 100644 --- a/Widgets/TopBar.qml +++ b/Widgets/TopBar.qml @@ -27,47 +27,74 @@ PanelWindow { right: true } - implicitHeight: Theme.barHeight + implicitHeight: Theme.barHeight - 4 color: "transparent" - Rectangle { + // Floating panel container with margins + Item { anchors.fill: parent - color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.95) + anchors.margins: 2 + anchors.topMargin: 6 + anchors.bottomMargin: 0 + anchors.leftMargin: 8 + anchors.rightMargin: 8 Rectangle { anchors.fill: parent - color: "transparent" - border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.12) - border.width: 1 - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Theme.surfaceTint.r, Theme.surfaceTint.g, Theme.surfaceTint.b, 0.08) + radius: Theme.cornerRadiusXLarge + color: Qt.rgba(Theme.surfaceContainer.r, Theme.surfaceContainer.g, Theme.surfaceContainer.b, 0.75) - SequentialAnimation on opacity { - running: true - loops: Animation.Infinite - NumberAnimation { - to: 0.12 - duration: Theme.extraLongDuration - easing.type: Theme.standardEasing - } - NumberAnimation { - to: 0.06 - duration: Theme.extraLongDuration - easing.type: Theme.standardEasing + // Material 3 elevation shadow + layer.enabled: true + layer.effect: DropShadow { + horizontalOffset: 0 + verticalOffset: 4 + radius: 16 + samples: 33 + color: Qt.rgba(0, 0, 0, 0.15) + transparentBorder: true + } + + // Subtle border for definition + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) + border.width: 1 + radius: parent.radius + } + + // Subtle surface tint overlay with animation + Rectangle { + anchors.fill: parent + color: Qt.rgba(Theme.surfaceTint.r, Theme.surfaceTint.g, Theme.surfaceTint.b, 0.04) + radius: parent.radius + + SequentialAnimation on opacity { + running: true + loops: Animation.Infinite + NumberAnimation { + to: 0.08 + duration: Theme.extraLongDuration + easing.type: Theme.standardEasing + } + NumberAnimation { + to: 0.02 + duration: Theme.extraLongDuration + easing.type: Theme.standardEasing + } } } } - } - - Item { - anchors.fill: parent - anchors.leftMargin: Theme.spacingL - anchors.rightMargin: Theme.spacingL - Row { + Item { + anchors.fill: parent + anchors.leftMargin: Theme.spacingM + anchors.rightMargin: Theme.spacingM + anchors.topMargin: Theme.spacingXS + anchors.bottomMargin: Theme.spacingXS + + Row { id: leftSection height: parent.height spacing: Theme.spacingL @@ -797,3 +824,4 @@ PanelWindow { } } } +} diff --git a/Widgets/TopBarSimple.qml b/Widgets/TopBarSimple.qml index df7f0feb..49566905 100644 --- a/Widgets/TopBarSimple.qml +++ b/Widgets/TopBarSimple.qml @@ -17,34 +17,60 @@ PanelWindow { right: true } - implicitHeight: theme.barHeight + WlrLayershell.topMargin: 8 + WlrLayershell.bottomMargin: 8 + WlrLayershell.leftMargin: 16 + WlrLayershell.rightMargin: 16 + + implicitHeight: theme.barHeight - 4 color: "transparent" Rectangle { anchors.fill: parent - color: Qt.rgba(theme.surfaceContainer.r, theme.surfaceContainer.g, theme.surfaceContainer.b, 0.95) + anchors.margins: 2 + anchors.topMargin: 6 + anchors.bottomMargin: 2 + anchors.leftMargin: 8 + anchors.rightMargin: 8 + radius: theme.cornerRadiusXLarge + color: Qt.rgba(theme.surfaceContainer.r, theme.surfaceContainer.g, theme.surfaceContainer.b, 0.75) + // Material 3 elevation shadow + layer.enabled: true + layer.effect: DropShadow { + horizontalOffset: 0 + verticalOffset: 4 + radius: 16 + samples: 33 + color: Qt.rgba(0, 0, 0, 0.15) + transparentBorder: true + } + + // Subtle border for definition Rectangle { anchors.fill: parent color: "transparent" - border.color: Qt.rgba(theme.outline.r, theme.outline.g, theme.outline.b, 0.12) + border.color: Qt.rgba(theme.outline.r, theme.outline.g, theme.outline.b, 0.08) border.width: 1 + radius: parent.radius } + // Subtle surface tint overlay with animation Rectangle { anchors.fill: parent - color: Qt.rgba(theme.surfaceTint.r, theme.surfaceTint.g, theme.surfaceTint.b, 0.08) + color: Qt.rgba(theme.surfaceTint.r, theme.surfaceTint.g, theme.surfaceTint.b, 0.04) + radius: parent.radius SequentialAnimation on opacity { running: true loops: Animation.Infinite NumberAnimation { - to: 0.12 + to: 0.08 duration: theme.extraLongDuration easing.type: theme.standardEasing } NumberAnimation { - to: 0.06 + to: 0.02 duration: theme.extraLongDuration easing.type: theme.standardEasing } @@ -56,6 +82,8 @@ PanelWindow { anchors.fill: parent anchors.leftMargin: theme.spacingL anchors.rightMargin: theme.spacingL + anchors.topMargin: theme.spacingXS + anchors.bottomMargin: theme.spacingXS // Left section - Apps and Workspace Switcher Row {