mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
revert: restore About dialog layout; minimal ScrollView width fix only
Put back the original About UI. Only change license label width binding (availableWidth → width) and ScrollBar policy to avoid the open crash.
This commit is contained in:
@@ -14,12 +14,6 @@ Dialog {
|
|||||||
property string appVersion: Qt.application.version
|
property string appVersion: Qt.application.version
|
||||||
property string buildId: "?"
|
property string buildId: "?"
|
||||||
|
|
||||||
title: qsTr("About BearWave")
|
|
||||||
modal: true
|
|
||||||
anchors.centerIn: parent
|
|
||||||
width: compactMode ? 360 : 480
|
|
||||||
standardButtons: Dialog.Ok
|
|
||||||
|
|
||||||
readonly property string versionLine: {
|
readonly property string versionLine: {
|
||||||
var version = root.appVersion
|
var version = root.appVersion
|
||||||
if (version === undefined || version === null || version === "")
|
if (version === undefined || version === null || version === "")
|
||||||
@@ -30,75 +24,189 @@ Dialog {
|
|||||||
return qsTr("Version") + " " + String(version) + " · " + qsTr("build") + " " + String(build)
|
return qsTr("Version") + " " + String(version) + " · " + qsTr("build") + " " + String(build)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
modal: true
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: compactMode ? 360 : 520
|
||||||
|
height: compactMode ? 560 : 680
|
||||||
|
standardButtons: Dialog.Ok
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
spacing: 12
|
spacing: 16
|
||||||
|
|
||||||
Image {
|
ColumnLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: 72
|
spacing: 6
|
||||||
Layout.preferredHeight: 72
|
|
||||||
source: "qrc:/assets/app/bearwave.png"
|
|
||||||
fillMode: Image.PreserveAspectFit
|
|
||||||
smooth: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
Image {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("BearWave")
|
Layout.preferredWidth: 72
|
||||||
color: BearTheme.textMain
|
Layout.preferredHeight: 72
|
||||||
font.bold: true
|
sourceSize.width: 72
|
||||||
font.pixelSize: 22
|
sourceSize.height: 72
|
||||||
}
|
source: "qrc:/assets/app/bearwave.png"
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
Label {
|
smooth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: qsTr("Internet Radio Player for KDE")
|
|
||||||
color: BearTheme.textMuted
|
|
||||||
font.pixelSize: 13
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: root.versionLine
|
|
||||||
color: BearTheme.textMuted
|
|
||||||
font.pixelSize: 12
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
text: qsTr("Author: Sebastian Palencsár")
|
|
||||||
color: BearTheme.textMain
|
|
||||||
font.pixelSize: 13
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
spacing: 12
|
|
||||||
|
|
||||||
Button {
|
|
||||||
text: qsTr("Website")
|
|
||||||
onClicked: Qt.openUrlExternally("https://palencsar.pro")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Label {
|
||||||
text: qsTr("GitHub")
|
Layout.alignment: Qt.AlignHCenter
|
||||||
onClicked: Qt.openUrlExternally("https://github.com/spalencsar")
|
text: qsTr("BearWave")
|
||||||
|
color: BearTheme.textMain
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 26
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Label {
|
||||||
text: qsTr("LinkedIn")
|
Layout.alignment: Qt.AlignHCenter
|
||||||
onClicked: Qt.openUrlExternally("https://www.linkedin.com/in/spalencsar/")
|
text: qsTr("Internet Radio Player for KDE")
|
||||||
|
color: BearTheme.textMuted
|
||||||
|
font.pixelSize: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
text: root.versionLine
|
||||||
|
color: BearTheme.textMuted
|
||||||
|
font.pixelSize: 12
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
ColumnLayout {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
spacing: 8
|
||||||
|
Layout.topMargin: 8
|
||||||
|
Layout.bottomMargin: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
text: qsTr("Author: Sebastian Palencsár")
|
||||||
|
color: BearTheme.textMain
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
Layout.preferredHeight: 40
|
||||||
|
onClicked: Qt.openUrlExternally("https://palencsar.pro")
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: qsTr("Open website")
|
||||||
|
contentItem: Item {
|
||||||
|
Image {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: 19
|
||||||
|
height: 19
|
||||||
|
source: "qrc:/assets/ui/globe.svg"
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
smooth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
radius: 20
|
||||||
|
color: parent.hovered ? "#274261" : "#1f3147"
|
||||||
|
border.color: BearTheme.cardBorder
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
Layout.preferredHeight: 40
|
||||||
|
onClicked: Qt.openUrlExternally("https://github.com/spalencsar")
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: qsTr("Open GitHub")
|
||||||
|
contentItem: Item {
|
||||||
|
Image {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: 19
|
||||||
|
height: 19
|
||||||
|
source: "qrc:/assets/ui/github.svg"
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
smooth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
radius: 20
|
||||||
|
color: parent.hovered ? "#274261" : "#1f3147"
|
||||||
|
border.color: BearTheme.cardBorder
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
Layout.preferredHeight: 40
|
||||||
|
onClicked: Qt.openUrlExternally("https://www.linkedin.com/in/spalencsar/")
|
||||||
|
ToolTip.visible: hovered
|
||||||
|
ToolTip.text: qsTr("Open LinkedIn")
|
||||||
|
contentItem: Item {
|
||||||
|
Image {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: 19
|
||||||
|
height: 19
|
||||||
|
source: "qrc:/assets/ui/linkedin.svg"
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
smooth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
radius: 20
|
||||||
|
color: parent.hovered ? "#274261" : "#1f3147"
|
||||||
|
border.color: BearTheme.cardBorder
|
||||||
|
border.width: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: root.width - 48
|
Layout.fillHeight: true
|
||||||
color: BearTheme.textMuted
|
spacing: 8
|
||||||
font.pixelSize: 10
|
|
||||||
wrapMode: Text.WordWrap
|
RowLayout {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
Layout.fillWidth: true
|
||||||
text: qsTr("Licensed under GNU GPLv3-or-later. Copyright (c) 2026 Sebastian Palencsar.")
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("GNU GPLv3 License")
|
||||||
|
color: BearTheme.textMain
|
||||||
|
font.bold: true
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
text: qsTr("Copyright (c) 2026")
|
||||||
|
color: BearTheme.textMuted
|
||||||
|
font.pixelSize: 11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.minimumHeight: 140
|
||||||
|
radius: 8
|
||||||
|
color: "#101a26"
|
||||||
|
border.color: BearTheme.cardBorder
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
id: licenseScroll
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 10
|
||||||
|
clip: true
|
||||||
|
ScrollBar.vertical.policy: ScrollBar.AsNeeded
|
||||||
|
|
||||||
|
Label {
|
||||||
|
width: Math.max(licenseScroll.width, 1)
|
||||||
|
color: BearTheme.textMain
|
||||||
|
font.pixelSize: 11
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
text: "This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user