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
|
\sa LogarithmPlotter
|
||||||
*/
|
*/
|
||||||
BaseDialog {
|
BaseDialog {
|
||||||
id: about
|
id: thanks
|
||||||
title: qsTr("Thanks and Contributions - LogarithmPlotter")
|
title: qsTr("Thanks and Contributions - LogarithmPlotter")
|
||||||
width: 450
|
width: 450
|
||||||
minimumHeight: 710
|
minimumHeight: 600
|
||||||
|
|
||||||
Column {
|
ScrollView {
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top;
|
top: parent.top;
|
||||||
left: parent.left;
|
left: parent.left;
|
||||||
|
@ -41,289 +42,311 @@ BaseDialog {
|
||||||
right: parent.right;
|
right: parent.right;
|
||||||
topMargin: margin;
|
topMargin: margin;
|
||||||
leftMargin: margin;
|
leftMargin: margin;
|
||||||
bottomMargin: margin;
|
bottomMargin: margin+30;
|
||||||
rightMargin: margin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spacing: 10
|
Column {
|
||||||
|
|
||||||
ListView {
|
|
||||||
id: librariesListView
|
|
||||||
anchors.left: parent.left
|
|
||||||
width: parent.width
|
|
||||||
//height: parent.height
|
|
||||||
implicitHeight: contentItem.childrenRect.height
|
|
||||||
interactive: false
|
|
||||||
|
|
||||||
model: ListModel {
|
anchors {
|
||||||
Component.onCompleted: {
|
left: parent.left;
|
||||||
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')
|
|
||||||
}]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header: Label {
|
width: thanks.width - 2*margin
|
||||||
id: librariesUsedHeader
|
spacing: 10
|
||||||
wrapMode: Text.WordWrap
|
|
||||||
font.pixelSize: 25
|
|
||||||
text: qsTr("Libraries included")
|
|
||||||
height: implicitHeight + 10
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: Column {
|
ListView {
|
||||||
id: libClmn
|
id: librariesListView
|
||||||
width: librariesListView.width
|
anchors.left: parent.left
|
||||||
spacing: 10
|
width: parent.width
|
||||||
|
//height: parent.height
|
||||||
|
implicitHeight: contentItem.childrenRect.height
|
||||||
|
interactive: false
|
||||||
|
|
||||||
Item {
|
model: ListModel {
|
||||||
height: libraryHeader.height
|
Component.onCompleted: {
|
||||||
width: parent.width
|
append({
|
||||||
|
libName: 'expr-eval',
|
||||||
Label {
|
license: 'MIT',
|
||||||
id: libraryHeader
|
licenseLink: 'https://raw.githubusercontent.com/silentmatt/expr-eval/master/LICENSE.txt',
|
||||||
anchors.left: parent.left
|
linkName: qsTr('Source code'),
|
||||||
wrapMode: Text.WordWrap
|
link: 'https://github.com/silentmatt/expr-eval',
|
||||||
font.pixelSize: 18
|
authors: [{
|
||||||
text: libName
|
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',
|
||||||
Row {
|
websiteName: qsTr('Source')
|
||||||
anchors.right: parent.right
|
}, {
|
||||||
height: parent.height
|
authorLine: qsTr('Ported to Javascript by Matthew Crumley'),
|
||||||
spacing: 10
|
email: 'email@matthewcrumley.com',
|
||||||
|
website: 'https://silentmatt.com/',
|
||||||
Button {
|
websiteName: qsTr('Website')
|
||||||
height: parent.height
|
}, {
|
||||||
text: license
|
authorLine: qsTr('Ported to QMLJS by Ad5001'),
|
||||||
icon.name: 'license'
|
email: 'mail@ad5001.eu',
|
||||||
onClicked: Qt.openUrlExternally(licenseLink)
|
website: 'https://ad5001.eu/',
|
||||||
}
|
websiteName: qsTr('Website')
|
||||||
|
}]
|
||||||
Button {
|
})
|
||||||
height: parent.height
|
|
||||||
text: linkName
|
|
||||||
icon.name: 'web-browser'
|
|
||||||
onClicked: Qt.openUrlExternally(link)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ListView {
|
header: Label {
|
||||||
id: libAuthors
|
id: librariesUsedHeader
|
||||||
anchors.left: parent.left
|
wrapMode: Text.WordWrap
|
||||||
anchors.leftMargin: 10
|
font.pixelSize: 25
|
||||||
model: authors
|
text: qsTr("Libraries included")
|
||||||
width: parent.width - 10
|
height: implicitHeight + 10
|
||||||
implicitHeight: contentItem.childrenRect.height
|
}
|
||||||
interactive: false
|
|
||||||
|
delegate: Column {
|
||||||
|
id: libClmn
|
||||||
|
width: librariesListView.width
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
delegate: Item {
|
Item {
|
||||||
id: libAuthor
|
height: libraryHeader.height
|
||||||
width: librariesListView.width - 10
|
width: parent.width
|
||||||
height: 50
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: libAuthorName
|
id: libraryHeader
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: buttons.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
font.pixelSize: 14
|
font.pixelSize: 18
|
||||||
text: authorLine
|
text: libName
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: buttons
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: parent.height
|
height: parent.height
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
height: parent.height
|
||||||
text: websiteName
|
text: license
|
||||||
|
icon.name: 'license'
|
||||||
|
onClicked: Qt.openUrlExternally(licenseLink)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
height: parent.height
|
||||||
|
text: linkName
|
||||||
icon.name: 'web-browser'
|
icon.name: 'web-browser'
|
||||||
height: parent.height - 10
|
onClicked: Qt.openUrlExternally(link)
|
||||||
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: {
|
|
||||||
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 {
|
ListView {
|
||||||
id: translationHeader
|
id: libAuthors
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.leftMargin: 10
|
||||||
wrapMode: Text.WordWrap
|
model: authors
|
||||||
font.pixelSize: 18
|
width: parent.width - 10
|
||||||
text: tranName
|
implicitHeight: contentItem.childrenRect.height
|
||||||
|
interactive: false
|
||||||
|
|
||||||
|
delegate: Item {
|
||||||
|
id: libAuthor
|
||||||
|
width: librariesListView.width - 10
|
||||||
|
height: 50
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Rectangle {
|
||||||
anchors.right: parent.right
|
id: libSeparator
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
opacity: 0.3
|
||||||
height: 30
|
color: sysPalette.windowText
|
||||||
spacing: 10
|
width: parent.width
|
||||||
|
height: 1
|
||||||
Button {
|
}
|
||||||
height: parent.height
|
}
|
||||||
text: qsTr('Improve')
|
}
|
||||||
icon.name: 'web-browser'
|
|
||||||
onClicked: Qt.openUrlExternally(link)
|
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 {
|
header: Label {
|
||||||
id: tranAuthors
|
id: translationsHeader
|
||||||
anchors.left: parent.left
|
wrapMode: Text.WordWrap
|
||||||
anchors.leftMargin: 10
|
font.pixelSize: 25
|
||||||
model: authors
|
text: qsTr("Translations included")
|
||||||
width: parent.width - 10
|
height: implicitHeight + 10
|
||||||
implicitHeight: contentItem.childrenRect.height
|
}
|
||||||
interactive: false
|
|
||||||
|
delegate: Column {
|
||||||
|
id: tranClmn
|
||||||
|
width: translationsListView.width
|
||||||
|
|
||||||
delegate: Item {
|
Item {
|
||||||
id: tranAuthor
|
width: parent.width
|
||||||
width: tranAuthors.width
|
height: translationHeader.height + 10
|
||||||
height: 40
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: tranAuthorName
|
id: translationHeader
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: buttons.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
font.pixelSize: 14
|
font.pixelSize: 18
|
||||||
text: authorLine
|
text: tranName
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: buttons
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
height: 30
|
height: 30
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: websiteName
|
|
||||||
icon.name: 'web-browser'
|
|
||||||
height: parent.height
|
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