Skip to content

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolcl committed Aug 4, 2023
1 parent 806a5d1 commit bd7e305
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
27 changes: 14 additions & 13 deletions barnatrees/qml/AboutDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import QtQuick
import QtQuick.Controls

Dialog {
id: root
modal: true
title: qsTr("About")
x: Math.round((window.width - width) / 2)
Expand All @@ -29,7 +30,7 @@ Dialog {

Flickable {
anchors.fill: parent
contentWidth: parent.availableWidth
contentWidth: root.availableWidth
contentHeight: col.height
ScrollIndicator.vertical: ScrollIndicator {}
clip: true
Expand All @@ -39,20 +40,20 @@ Dialog {
spacing: 10

Label {
width: parent.availableWidth
width: root.availableWidth
text: qsTr("<h1>Barcelona Trees</h1>A guide of the trees of Barcelona. "
+ "version: %1 git: %2.<br/>Copyright © 2019-2023 Pedro López-Cabanillas.<br/>"
+ "This program comes with ABSOLUTELY NO WARRANTY. "
+ "This is free software, and you are welcome to redistribute it "
+ "under the terms of the license "
+ "<a href='https://www.gnu.org/licenses/gpl-3.0.html'>GPLv3</a>")
.arg(Qt.application.version).arg(gitversion)
wrapMode: Label.Wrap
wrapMode: Label.WordWrap
onLinkActivated: Qt.openUrlExternally(link)
}

Label {
width: parent.availableWidth
width: root.availableWidth
text: qsTr("This program uses Qt version %1 (<a href='https://www.qt.io/'>www.qt.io</a>)<br/>"
+ "This application includes software developed by the OpenSSL Project for use in "
+ "the <a href='http://www.openssl.org/'>OpenSSL Toolkit</a>. This program is released under "
Expand All @@ -61,51 +62,51 @@ Dialog {
+ "and <a href='http://p7zip.sourceforge.net'>p7zip</a> projects and some classes from the "
+ "<a href='https://doc.qt.io/qtinstallerframework/'>Qt Installer Framework</a>.")
.arg(qtversion);
wrapMode: Label.Wrap
wrapMode: Label.WordWrap
onLinkActivated: Qt.openUrlExternally(link)
}

Image {
width: parent.availableWidth
width: root.availableWidth
horizontalAlignment: Image.AlignHCenter
fillMode: Image.PreserveAspectFit
source: "qrc:/barnatrees_icon64.png"
}

Label {
width: parent.availableWidth
width: root.availableWidth
text: qsTr("This application contains data provided by the Barcelona's city council: "
+ "<a href='https://opendata-ajuntament.barcelona.cat/en/'>Open Data BCN</a> "
+ "using the datasets <b>Zone trees of the city of Barcelona</b>, "
+ "<b>Street trees of the city of Barcelona</b>, "
+ "and <b>Trees in the parks of the city of Barcelona</b>, "
+ "under the therms of the <a href='https://creativecommons.org/licenses/by/4.0/'>"
+ "Creative Commons Attribution 4.0 International (CC BY 4.0)</a> license.");
wrapMode: Label.Wrap
wrapMode: Label.WordWrap
onLinkActivated: Qt.openUrlExternally(link)
}

Repeater {
model: summaryModel
width: parent.availableWidth
delegate: Column {
width: parent.width
width: root.availableWidth
spacing: 4
Label {
width: parent.width
width: root.availableWidth
font.bold: true
text: name
}
Label {
width: parent.width
width: root.availableWidth
text: qsTr("Processed: %1").arg(description)
}
Label {
width: parent.width
width: root.availableWidth
text: qsTr("Trees: %L1").arg(specimens)
}
Label {
width: parent.width
width: root.availableWidth
text: qsTr("Species: %L1").arg(species)
}
}
Expand Down
20 changes: 14 additions & 6 deletions barnatrees/qml/MainWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -644,45 +644,53 @@ ApplicationWindow {
close()
homePage.delayedBalloonTip(idx)
}
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

AboutDialog {
id: aboutDialog
onAboutToShow: {
map.enabled = false
}
onAboutToHide: {
map.enabled = true
}
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

GenderSearchDialog {
id: genderSearchDialog
onDialogAccepted: homePage.clearItems()
onResultsFound: homePage.resultsFound()
onResultsNotFound: resultsNotFoundDialog.open()
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

SettingsDialog {
id: settingsDialog
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

SpecieSearchDialog {
id: specieSearchDialog
onDialogAccepted: homePage.clearItems()
onResultsFound: homePage.resultsFound()
onResultsNotFound: resultsNotFoundDialog.open()
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

SpecimenDialog {
id: specimenDialog
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

StreetSearchDialog {
id: streetSearchDialog
onDialogAccepted: homePage.clearItems()
onResultsFound: homePage.resultsFound()
onResultsNotFound: resultsNotFoundDialog.open()
onAboutToShow: { map.enabled = false }
onAboutToHide: { map.enabled = true }
}

MsgDialog {
Expand Down

0 comments on commit bd7e305

Please sign in to comment.