Improving ThanksTo (to add scrolling)
This commit is contained in:
parent
7b76a8fe08
commit
e3eea751cb
1 changed files with 260 additions and 237 deletions
|
@ -28,12 +28,13 @@ import QtQuick.Controls
|
|||
\sa LogarithmPlotter
|
||||
*/
|
||||
BaseDialog {
|
||||
id: about
|
||||
id: thanks
|
||||
title: qsTr("Thanks and Contributions - LogarithmPlotter")
|
||||
width: 450
|
||||
minimumHeight: 710
|
||||
minimumHeight: 600
|
||||
|
||||
ScrollView {
|
||||
|
||||
Column {
|
||||
anchors {
|
||||
top: parent.top;
|
||||
left: parent.left;
|
||||
|
@ -41,289 +42,311 @@ BaseDialog {
|
|||
right: parent.right;
|
||||
topMargin: margin;
|
||||
leftMargin: margin;
|
||||
bottomMargin: margin;
|
||||
rightMargin: margin;
|
||||
bottomMargin: margin+30;
|
||||
}
|
||||
|
||||
spacing: 10
|
||||
Column {
|
||||
|
||||
ListView {
|
||||
id: librariesListView
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
//height: parent.height
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
|
||||
model: ListModel {
|
||||
Component.onCompleted: {
|
||||
append({
|
||||
libName: 'expr-eval',
|
||||
license: 'MIT',
|
||||
licenseLink: 'https://raw.githubusercontent.com/silentmatt/expr-eval/master/LICENSE.txt',
|
||||
linkName: qsTr('Source code'),
|
||||
link: 'https://github.com/silentmatt/expr-eval',
|
||||
authors: [{
|
||||
authorLine: qsTr('Original library by Raphael Graf'),
|
||||
email: 'r@undefined.ch',
|
||||
website: 'https://web.archive.org/web/20111023001618/http://www.undefined.ch/mparser/index.html',
|
||||
websiteName: qsTr('Source')
|
||||
}, {
|
||||
authorLine: qsTr('Ported to Javascript by Matthew Crumley'),
|
||||
email: 'email@matthewcrumley.com',
|
||||
website: 'https://silentmatt.com/',
|
||||
websiteName: qsTr('Website')
|
||||
}, {
|
||||
authorLine: qsTr('Ported to QMLJS by Ad5001'),
|
||||
email: 'mail@ad5001.eu',
|
||||
website: 'https://ad5001.eu/',
|
||||
websiteName: qsTr('Website')
|
||||
}]
|
||||
})
|
||||
}
|
||||
anchors {
|
||||
left: parent.left;
|
||||
}
|
||||
|
||||
header: Label {
|
||||
id: librariesUsedHeader
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 25
|
||||
text: qsTr("Libraries included")
|
||||
height: implicitHeight + 10
|
||||
}
|
||||
width: thanks.width - 2*margin
|
||||
spacing: 10
|
||||
|
||||
delegate: Column {
|
||||
id: libClmn
|
||||
width: librariesListView.width
|
||||
spacing: 10
|
||||
ListView {
|
||||
id: librariesListView
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
//height: parent.height
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
|
||||
Item {
|
||||
height: libraryHeader.height
|
||||
width: parent.width
|
||||
|
||||
Label {
|
||||
id: libraryHeader
|
||||
anchors.left: parent.left
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 18
|
||||
text: libName
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.right: parent.right
|
||||
height: parent.height
|
||||
spacing: 10
|
||||
|
||||
Button {
|
||||
height: parent.height
|
||||
text: license
|
||||
icon.name: 'license'
|
||||
onClicked: Qt.openUrlExternally(licenseLink)
|
||||
}
|
||||
|
||||
Button {
|
||||
height: parent.height
|
||||
text: linkName
|
||||
icon.name: 'web-browser'
|
||||
onClicked: Qt.openUrlExternally(link)
|
||||
}
|
||||
model: ListModel {
|
||||
Component.onCompleted: {
|
||||
append({
|
||||
libName: 'expr-eval',
|
||||
license: 'MIT',
|
||||
licenseLink: 'https://raw.githubusercontent.com/silentmatt/expr-eval/master/LICENSE.txt',
|
||||
linkName: qsTr('Source code'),
|
||||
link: 'https://github.com/silentmatt/expr-eval',
|
||||
authors: [{
|
||||
authorLine: qsTr('Original library by Raphael Graf'),
|
||||
email: 'r@undefined.ch',
|
||||
website: 'https://web.archive.org/web/20111023001618/http://www.undefined.ch/mparser/index.html',
|
||||
websiteName: qsTr('Source')
|
||||
}, {
|
||||
authorLine: qsTr('Ported to Javascript by Matthew Crumley'),
|
||||
email: 'email@matthewcrumley.com',
|
||||
website: 'https://silentmatt.com/',
|
||||
websiteName: qsTr('Website')
|
||||
}, {
|
||||
authorLine: qsTr('Ported to QMLJS by Ad5001'),
|
||||
email: 'mail@ad5001.eu',
|
||||
website: 'https://ad5001.eu/',
|
||||
websiteName: qsTr('Website')
|
||||
}]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: libAuthors
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
model: authors
|
||||
width: parent.width - 10
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
header: Label {
|
||||
id: librariesUsedHeader
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 25
|
||||
text: qsTr("Libraries included")
|
||||
height: implicitHeight + 10
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
id: libAuthor
|
||||
width: librariesListView.width - 10
|
||||
height: 50
|
||||
delegate: Column {
|
||||
id: libClmn
|
||||
width: librariesListView.width
|
||||
spacing: 10
|
||||
|
||||
Item {
|
||||
height: libraryHeader.height
|
||||
width: parent.width
|
||||
|
||||
Label {
|
||||
id: libAuthorName
|
||||
id: libraryHeader
|
||||
anchors.left: parent.left
|
||||
anchors.right: buttons.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 14
|
||||
text: authorLine
|
||||
font.pixelSize: 18
|
||||
text: libName
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttons
|
||||
anchors.right: parent.right
|
||||
height: parent.height
|
||||
spacing: 10
|
||||
|
||||
Button {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: websiteName
|
||||
icon.name: 'web-browser'
|
||||
height: parent.height - 10
|
||||
onClicked: Qt.openUrlExternally(website)
|
||||
height: parent.height
|
||||
text: license
|
||||
icon.name: 'license'
|
||||
onClicked: Qt.openUrlExternally(licenseLink)
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr('Email')
|
||||
icon.name: 'email'
|
||||
height: parent.height - 10
|
||||
onClicked: Qt.openUrlExternally('mailto:' + email)
|
||||
height: parent.height
|
||||
text: linkName
|
||||
icon.name: 'web-browser'
|
||||
onClicked: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: libSeparator
|
||||
opacity: 0.3
|
||||
color: sysPalette.windowText
|
||||
width: parent.width
|
||||
height: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: translationsListView
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
spacing: 3
|
||||
|
||||
|
||||
model: ListModel {
|
||||
Component.onCompleted: {
|
||||
append({
|
||||
tranName: '🇬🇧 ' + qsTr('English'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/en/',
|
||||
authors: [{
|
||||
authorLine: 'Ad5001',
|
||||
email: 'mail@ad5001.eu',
|
||||
website: 'https://ad5001.eu',
|
||||
websiteName: qsTr('Website')
|
||||
}]
|
||||
})
|
||||
append({
|
||||
tranName: '🇫🇷 ' + qsTr('French'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/fr/',
|
||||
authors: [{
|
||||
authorLine: 'Ad5001',
|
||||
website: 'https://ad5001.eu',
|
||||
websiteName: qsTr('Website')
|
||||
}]
|
||||
})
|
||||
append({
|
||||
tranName: '🇩🇪 ' + qsTr('German'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/de/',
|
||||
authors: [{
|
||||
authorLine: 'Ad5001',
|
||||
website: 'https://ad5001.eu',
|
||||
websiteName: qsTr('Website')
|
||||
}]
|
||||
})
|
||||
append({
|
||||
tranName: '🇭🇺 ' + qsTr('Hungarian'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/hu/',
|
||||
authors: [{
|
||||
authorLine: 'Óvári',
|
||||
website: 'https://github.com/ovari',
|
||||
websiteName: qsTr('Github')
|
||||
}]
|
||||
})
|
||||
append({
|
||||
tranName: '🇳🇴 ' + qsTr('Norwegian'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/no/',
|
||||
authors: [{
|
||||
authorLine: 'Allan Nordhøy',
|
||||
website: 'https://github.com/comradekingu',
|
||||
websiteName: qsTr('Github')
|
||||
}]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
header: Label {
|
||||
id: translationsHeader
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 25
|
||||
text: qsTr("Translations included")
|
||||
height: implicitHeight + 10
|
||||
}
|
||||
|
||||
delegate: Column {
|
||||
id: tranClmn
|
||||
width: translationsListView.width
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: translationHeader.height + 10
|
||||
|
||||
Label {
|
||||
id: translationHeader
|
||||
ListView {
|
||||
id: libAuthors
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 18
|
||||
text: tranName
|
||||
}
|
||||
anchors.leftMargin: 10
|
||||
model: authors
|
||||
width: parent.width - 10
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
|
||||
Row {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 30
|
||||
spacing: 10
|
||||
delegate: Item {
|
||||
id: libAuthor
|
||||
width: librariesListView.width - 10
|
||||
height: 50
|
||||
|
||||
Button {
|
||||
height: parent.height
|
||||
text: qsTr('Improve')
|
||||
icon.name: 'web-browser'
|
||||
onClicked: Qt.openUrlExternally(link)
|
||||
Label {
|
||||
id: libAuthorName
|
||||
anchors.left: parent.left
|
||||
anchors.right: buttons.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 14
|
||||
text: authorLine
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttons
|
||||
anchors.right: parent.right
|
||||
height: parent.height
|
||||
spacing: 10
|
||||
|
||||
Button {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: websiteName
|
||||
icon.name: 'web-browser'
|
||||
height: parent.height - 10
|
||||
onClicked: Qt.openUrlExternally(website)
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: qsTr('Email')
|
||||
icon.name: 'email'
|
||||
height: parent.height - 10
|
||||
onClicked: Qt.openUrlExternally('mailto:' + email)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: libSeparator
|
||||
opacity: 0.3
|
||||
color: sysPalette.windowText
|
||||
width: parent.width
|
||||
height: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: translationsListView
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
spacing: 3
|
||||
|
||||
|
||||
model: ListModel {
|
||||
Component.onCompleted: {
|
||||
const authors = {
|
||||
Ad5001: {
|
||||
authorLine: 'Ad5001',
|
||||
email: 'mail@ad5001.eu',
|
||||
website: 'https://ad5001.eu',
|
||||
websiteName: qsTr('Website')
|
||||
},
|
||||
Ovari: {
|
||||
authorLine: 'Óvári',
|
||||
website: 'https://github.com/ovari',
|
||||
websiteName: qsTr('Github')
|
||||
},
|
||||
comradekingu: {
|
||||
authorLine: 'Allan Nordhøy',
|
||||
website: 'https://github.com/comradekingu',
|
||||
websiteName: qsTr('Github')
|
||||
},
|
||||
IngrownMink4: {
|
||||
authorLine: 'IngrownMink4',
|
||||
website: 'https://github.com/IngrownMink4',
|
||||
websiteName: qsTr('Github')
|
||||
},
|
||||
gallegonovato: {
|
||||
authorLine: 'gallegonovato',
|
||||
website: '',
|
||||
websiteName: ''
|
||||
}
|
||||
}
|
||||
|
||||
append({
|
||||
tranName: '🇬🇧 ' + qsTr('English'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/en/',
|
||||
authors: [authors.Ad5001]
|
||||
})
|
||||
append({
|
||||
tranName: '🇫🇷 ' + qsTr('French'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/fr/',
|
||||
authors: [authors.Ad5001]
|
||||
})
|
||||
append({
|
||||
tranName: '🇩🇪 ' + qsTr('German'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/de/',
|
||||
authors: [authors.Ad5001]
|
||||
})
|
||||
append({
|
||||
tranName: '🇭🇺 ' + qsTr('Hungarian'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/hu/',
|
||||
authors: [authors.Ovari]
|
||||
})
|
||||
append({
|
||||
tranName: '🇳🇴 ' + qsTr('Norwegian'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/no/',
|
||||
authors: [authors.comradekingu, authors.Ad5001]
|
||||
})
|
||||
append({
|
||||
tranName: '🇳🇴 ' + qsTr('Spanish'),
|
||||
link: 'https://hosted.weblate.org/projects/logarithmplotter/logarithmplotter/es/',
|
||||
authors: [authors.IngrownMink4, authors.gallegonovato]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: tranAuthors
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
model: authors
|
||||
width: parent.width - 10
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
header: Label {
|
||||
id: translationsHeader
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 25
|
||||
text: qsTr("Translations included")
|
||||
height: implicitHeight + 10
|
||||
}
|
||||
|
||||
delegate: Item {
|
||||
id: tranAuthor
|
||||
width: tranAuthors.width
|
||||
height: 40
|
||||
delegate: Column {
|
||||
id: tranClmn
|
||||
width: translationsListView.width
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
height: translationHeader.height + 10
|
||||
|
||||
Label {
|
||||
id: tranAuthorName
|
||||
id: translationHeader
|
||||
anchors.left: parent.left
|
||||
anchors.right: buttons.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 14
|
||||
text: authorLine
|
||||
font.pixelSize: 18
|
||||
text: tranName
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttons
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 30
|
||||
spacing: 10
|
||||
|
||||
Button {
|
||||
text: websiteName
|
||||
icon.name: 'web-browser'
|
||||
height: parent.height
|
||||
onClicked: Qt.openUrlExternally(website)
|
||||
text: qsTr('Improve')
|
||||
icon.name: 'web-browser'
|
||||
onClicked: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: tranAuthors
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 10
|
||||
model: authors
|
||||
width: parent.width - 10
|
||||
implicitHeight: contentItem.childrenRect.height
|
||||
interactive: false
|
||||
|
||||
delegate: Item {
|
||||
id: tranAuthor
|
||||
width: tranAuthors.width
|
||||
height: 40
|
||||
|
||||
Label {
|
||||
id: tranAuthorName
|
||||
anchors.left: parent.left
|
||||
//anchors.right: buttons.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
wrapMode: Text.WordWrap
|
||||
font.pixelSize: 14
|
||||
text: authorLine
|
||||
}
|
||||
|
||||
Row {
|
||||
id: buttons
|
||||
anchors.left: tranAuthorName.right
|
||||
anchors.leftMargin: 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 30
|
||||
spacing: 10
|
||||
|
||||
Button {
|
||||
text: websiteName
|
||||
visible: websiteName !== ""
|
||||
icon.name: 'web-browser'
|
||||
height: parent.height
|
||||
onClicked: Qt.openUrlExternally(website)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue