From e219b060a418dcae7273a9e1f7590d4f19b8c46a Mon Sep 17 00:00:00 2001 From: Sebastian Palencsar Date: Sat, 27 Jun 2026 13:26:32 +0200 Subject: [PATCH] fix(ui): restore navigation when viewing the About page Keep a compact header navigation bar visible on the About page so users can return to station browsing. Make the sidebar logo navigate home and add World to the compact header navigation. --- src/qml/Main.qml | 7 ++- src/qml/components/HeaderNavigation.qml | 63 +++++++++++++++++++++- src/qml/components/SidebarNavigation.qml | 45 +++++++++------- translations/bearwave_de.ts | 66 ++++++++++++++---------- translations/bearwave_ru.ts | 48 ++++++++++------- 5 files changed, 160 insertions(+), 69 deletions(-) diff --git a/src/qml/Main.qml b/src/qml/Main.qml index 531edef..ef25fd9 100644 --- a/src/qml/Main.qml +++ b/src/qml/Main.qml @@ -184,7 +184,7 @@ ApplicationWindow { Rectangle { id: headerPanel - height: currentPage === "about" && !root.compactMode ? 1 : headerContent.implicitHeight + 18 + height: headerContent.implicitHeight + 18 anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top @@ -206,13 +206,12 @@ ApplicationWindow { anchors.fill: parent anchors.margins: 9 spacing: 8 - visible: !(currentPage === "about" && !root.compactMode) HeaderNavigation { Layout.fillWidth: true app: root compactMode: root.compactMode - visible: root.compactMode + visible: root.compactMode || currentPage === "about" } Rectangle { @@ -220,7 +219,7 @@ ApplicationWindow { Layout.preferredHeight: 1 color: BearTheme.cardBorder opacity: 0.6 - visible: root.compactMode + visible: root.compactMode || currentPage === "about" } SearchToolbar { diff --git a/src/qml/components/HeaderNavigation.qml b/src/qml/components/HeaderNavigation.qml index 750b64e..39f550c 100644 --- a/src/qml/components/HeaderNavigation.qml +++ b/src/qml/components/HeaderNavigation.qml @@ -13,13 +13,66 @@ Item { required property var app required property bool compactMode - implicitWidth: compactNav.implicitWidth - implicitHeight: compactNav.implicitHeight + implicitWidth: root.compactMode ? compactNav.implicitWidth : desktopNav.implicitWidth + implicitHeight: root.compactMode ? compactNav.implicitHeight : desktopNav.implicitHeight + + RowLayout { + id: desktopNav + anchors.left: parent.left + anchors.right: parent.right + visible: !root.compactMode + spacing: 8 + + Button { + text: qsTr("Top") + highlighted: app.currentPage === "top" + onClicked: app.navigateToTop() + } + + Button { + text: qsTr("DE") + highlighted: app.currentPage === "german" + onClicked: app.navigateToGerman() + } + + Button { + text: qsTr("NL") + highlighted: app.currentPage === "dutch" + onClicked: app.navigateToDutch() + } + + Button { + text: qsTr("World") + highlighted: app.currentPage === "world" + onClicked: app.navigateToWorld() + } + + Button { + text: qsTr("Favorites") + highlighted: app.currentPage === "favorites" + onClicked: app.navigateToFavorites() + } + + Button { + text: qsTr("History") + highlighted: app.currentPage === "history" + onClicked: app.navigateToHistory() + } + + Item { Layout.fillWidth: true } + + Button { + text: qsTr("About") + highlighted: app.currentPage === "about" + onClicked: app.navigateToAbout() + } + } ColumnLayout { id: compactNav anchors.left: parent.left anchors.right: parent.right + visible: root.compactMode spacing: 8 RowLayout { @@ -93,6 +146,12 @@ Item { highlighted: app.currentPage === "history" onClicked: app.navigateToHistory() } + + Button { + text: qsTr("World") + highlighted: app.currentPage === "world" + onClicked: app.navigateToWorld() + } } } } \ No newline at end of file diff --git a/src/qml/components/SidebarNavigation.qml b/src/qml/components/SidebarNavigation.qml index a99a90c..a8ea810 100644 --- a/src/qml/components/SidebarNavigation.qml +++ b/src/qml/components/SidebarNavigation.qml @@ -23,28 +23,37 @@ Rectangle { anchors.margins: 20 spacing: 14 - RowLayout { + MouseArea { Layout.fillWidth: true - spacing: 10 Layout.bottomMargin: 8 + height: brandRow.implicitHeight + hoverEnabled: true + cursorShape: Qt.PointingHandCursor + onClicked: app.navigateToTop() - Image { - Layout.preferredWidth: 34 - Layout.preferredHeight: 34 - source: "qrc:/assets/app/bearwave.png" - fillMode: Image.PreserveAspectFit - smooth: true - mipmap: true - } + RowLayout { + id: brandRow + anchors.fill: parent + spacing: 10 - Image { - Layout.fillWidth: true - Layout.preferredHeight: 28 - source: "qrc:/assets/app/bearwave_line.png" - fillMode: Image.PreserveAspectFit - horizontalAlignment: Image.AlignLeft - smooth: true - mipmap: true + Image { + Layout.preferredWidth: 34 + Layout.preferredHeight: 34 + source: "qrc:/assets/app/bearwave.png" + fillMode: Image.PreserveAspectFit + smooth: true + mipmap: true + } + + Image { + Layout.fillWidth: true + Layout.preferredHeight: 28 + source: "qrc:/assets/app/bearwave_line.png" + fillMode: Image.PreserveAspectFit + horizontalAlignment: Image.AlignLeft + smooth: true + mipmap: true + } } } diff --git a/translations/bearwave_de.ts b/translations/bearwave_de.ts index cb63543..a45b004 100644 --- a/translations/bearwave_de.ts +++ b/translations/bearwave_de.ts @@ -45,8 +45,8 @@ - Build - Build-Nr. + Build + Build-Nr. @@ -146,7 +146,7 @@ BearWave uses the following frameworks, services, and desktop standards. These components are not relicensed by BearWave. - BearWave nutzt die folgenden Rahmenwerke, Dienste und Desktop-Standards. Diese Komponenten werden nicht durch BearWave neu lizenziert. + BearWave nutzt die folgenden Rahmenwerke, Dienste und Desktop-Standards. Diese Komponenten werden nicht durch BearWave neu lizenziert. @@ -236,13 +236,13 @@ - News / Talk - Nachrichten / Talk + News / Talk + Nachrichten / Talk - Soundtracks - Filmmusik + Soundtracks + Filmmusik @@ -291,27 +291,38 @@ HeaderNavigation - + + Top Top - + + DE DE - + + NL NL - + + + World + Welt + + + + Favorites Favoriten - + + History Verlauf @@ -320,9 +331,10 @@ Manuell + - - About - Info + + + About + Info Resume @@ -345,7 +357,7 @@ BearWave - + Error: Fehler: @@ -553,42 +565,42 @@ SidebarNavigation - + Stations Sender - + Top Global Weltweite Top-Sender - + Germany Deutschland - + Netherlands Niederlande - + Library Mediathek - + Favorites Favoriten - + History Verlauf - + Worldwide Weltweit @@ -605,17 +617,17 @@ MEDIATHEK - + Add Station Sender hinzufügen - + About BearWave Über BearWave - + Resume Fortsetzen diff --git a/translations/bearwave_ru.ts b/translations/bearwave_ru.ts index d6c7ba3..388b5e5 100644 --- a/translations/bearwave_ru.ts +++ b/translations/bearwave_ru.ts @@ -299,27 +299,38 @@ HeaderNavigation - + + Top Топ - + + DE DE - + + NL NL - + + + World + Мир + + + + Favorites Избранные - + + History История @@ -328,7 +339,8 @@ Вручную + - + + About О BearWave @@ -353,7 +365,7 @@ BearWave - + Error: Ошибка: @@ -561,42 +573,42 @@ SidebarNavigation - + Stations Станции - + Top Global Всемирный топ - + Germany Германия - + Netherlands Нидерланды - + Library Библиотека - + Favorites Избранные - + History История - + Worldwide Весь мир @@ -605,17 +617,17 @@ Поиск - + Add Station Добавить станцию - + About BearWave О BearWave - + Resume Продолжить