Merge branch 'main' of github.com:QuasarApp/Credits
All checks were successful
buildbot/DocsGenerator Build finished.
buildbot/LinuxBuilder Build finished.
buildbot/AndroidBuilder_v8 Build finished.
buildbot/AndroidBuilder_v7 Build finished.
buildbot/AndroidBuilder_v8Qt6 Build finished.
buildbot/Wasm32Builder Build finished.
buildbot/LinuxCMakeBuilder Build finished.
buildbot/LinuxCMakeBuilderQt6 Build finished.
buildbot/WindowsBuilder Build finished.
buildbot/WindowsCMakeBuilder Build finished.

This commit is contained in:
Andrei Yankovich 2021-10-21 09:48:03 +03:00
commit 7fc5265b4b
3 changed files with 63 additions and 94 deletions

View File

@ -12,15 +12,25 @@ ApplicationWindow {
Credits {
state: "about"
developersList: [
listCustomInfo: [
{
section: qsTr("## QuasarApp Core"),
sectionList: [
"* Oleg-Disigner",
"* Yankovich Andrei"
]
text: "## QuasarApp Developers: ",
align: Label.AlignHCenter,
color: ""
},
{
text: "* [google](https://www.google.com/)",
align: Label.AlignHCenter,
color: ""
},
{
text: "* Yankovich Andrei",
align: Label.AlignHCenter,
color: "Red"
}
]
}
Credits {
state: "minimal"
@ -46,14 +56,10 @@ ApplicationWindow {
Credits {
state: "full"
developersList: [
{
section: qsTr("## QuasarApp Core"),
sectionList: [
"* Oleg-Disigner",
"* Yankovich Andrei"
]
}
listCustomInfo: [
{text: "## QuasarApp Core"},
{text: "* Oleg-Disigner"},
{text: "* Yankovich Andrei"}
]
}
}

View File

@ -10,24 +10,14 @@ Page {
property bool showHeader: true
property bool showPatreon: true
property bool showBitcoin: true
property bool showPatrons: (showQR || showPatreon || showBitcoin) && patronsList.length
property bool showPatrons: (showQR || showPatreon || showBitcoin)
// developersa and patronsList lists must be contain structure with a section amd sectionList fields.
// The section it is section name
// the sectionList it is list of section members.
property string iconLogo: ""
property int iconWidth: 250
property var developersList: []
property var versionList: []
property var patronsList: [
{
section: qsTr("## Silver Membership Patrons:"),
sectionList: [
"* Rustem Husnutdinov",
"* Semih Ufuk Güler"
]
}
]
property var listCustomInfo: []
header: Image {
fillMode: Image.PreserveAspectFit
@ -116,52 +106,10 @@ Page {
}
Label {
text: qsTr("# Our patrons list:")
Layout.fillWidth: true
textFormat: TextEdit.MarkdownText
visible: showPatrons
}
ListViewer {
model: patronsList
model: listCustomInfo
visible: showPatrons
}
Label {
text: qsTr("# Developers list:")
Layout.fillWidth: true
textFormat: TextEdit.MarkdownText
visible: developersList.length
}
ListViewer {
model: developersList
visible: developersList.length
}
Label {
text: qsTr("# Version list:")
Layout.fillWidth: true
textFormat: TextEdit.MarkdownText
visible: versionList.length
}
ListViewer {
model: versionList
visible: versionList.length
visible: listCustomInfo.length
}
}
@ -223,7 +171,6 @@ Page {
showPatreon: false
showBitcoin: false
showPatrons: true
}
},
@ -235,8 +182,6 @@ Page {
showHeader: false
showPatreon: false
showBitcoin: false
patronsList: []
}
}
]

View File

@ -1,6 +1,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls.Material 2.15
// developersa and patronsList lists must be contain structure with a section amd sectionList fields.
// The section it is section name
@ -8,36 +9,53 @@ import QtQuick.Layouts 1.15
// Example of the structure:
//[
// {
// section: qsTr("## Silver Membership Patrons:"),
// sectionList: [
// "* Rustem Husnutdinov",
// "* Semih Ufuk Güler"
// ]
// text: "## QuasarApp Developers: ",
// align: Label.AlignHCenter,
// color: ""
// },
// {
// text: "* [Oleg-Disigner](https://www.google.com/)",
// align: Label.AlignHCenter,
// color: ""
// },
// {
// text: "* Yankovich Andrei",
// align: Label.AlignHCenter,
// color: "Red"
// }
//]
Repeater {
ColumnLayout {
Layout.fillWidth: true
ColumnLayout {
id: root
property var model: []
Layout.fillWidth: true
Repeater {
model: root.model
Label {
text: modelData.section
id: lableSource
text: modelData.text
Layout.fillWidth: true
horizontalAlignment: (modelData.align)? modelData.align : horizontalAlignment
color: (modelData.color && modelData.color.length)? modelData.color: color
wrapMode: Text.WordWrap
textFormat: TextEdit.MarkdownText
linkColor: Material.accent
onLinkActivated: (link) => {
Qt.openUrlExternally(link)
}
onLinkHovered: (link) => {
if (link.length) {
lableSource.ToolTip.show(link)
} else {
lableSource.ToolTip.hide()
}
}
}
Repeater {
model: modelData.sectionList
Label {
text: modelData
Layout.fillWidth: true
textFormat: TextEdit.MarkdownText
}
}
}
}