Fixing changelog
This commit is contained in:
parent
999999832a
commit
9879e7fbc9
1 changed files with 12 additions and 3 deletions
|
@ -32,7 +32,7 @@ Popup {
|
||||||
id: changelogPopup
|
id: changelogPopup
|
||||||
x: (parent.width-width)/2
|
x: (parent.width-width)/2
|
||||||
y: Math.max(20, (parent.height-height)/2)
|
y: Math.max(20, (parent.height-height)/2)
|
||||||
width: changelog.width+40
|
width: 800
|
||||||
height: Math.min(parent.height-40, 500)
|
height: Math.min(parent.height-40, 500)
|
||||||
modal: true
|
modal: true
|
||||||
focus: true
|
focus: true
|
||||||
|
@ -44,33 +44,42 @@ Popup {
|
||||||
*/
|
*/
|
||||||
property bool changelogNeedsFetching: true
|
property bool changelogNeedsFetching: true
|
||||||
|
|
||||||
onAboutToShow: if(changelogNeedsFetching) Helper.fetchChangelog()
|
onAboutToShow: if(changelogNeedsFetching) {
|
||||||
|
Helper.fetchChangelog()
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Helper
|
target: Helper
|
||||||
function onChangelogFetched(chl) {
|
function onChangelogFetched(chl) {
|
||||||
changelogNeedsFetching = false;
|
changelogNeedsFetching = false;
|
||||||
changelog.text = chl
|
changelog.text = chl
|
||||||
|
changelogView.contentItem.implicitHeight = changelog.height
|
||||||
|
// console.log(changelog.height, changelogView.contentItem.implicitHeight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollView {
|
ScrollView {
|
||||||
|
id: changelogView
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 10
|
anchors.topMargin: 10
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10
|
||||||
anchors.bottom: doneBtn.top
|
anchors.bottom: doneBtn.top
|
||||||
anchors.bottomMargin: 10
|
anchors.bottomMargin: 10
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: changelog
|
id: changelog
|
||||||
color: sysPalette.windowText
|
color: sysPalette.windowText
|
||||||
|
width: 760
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
textFormat: TextEdit.MarkdownText
|
textFormat: TextEdit.MarkdownText
|
||||||
|
|
||||||
text: qsTr("Fetching changelog...")
|
text: qsTr("Fetching changelog...")
|
||||||
onLinkActivated: Qt.openUrlExternally(link)
|
onLinkActivated: Qt.openUrlExternally(link)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue