D10131: Expose more URLs relevant to the app
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Sat Jan 27 00:36:18 UTC 2018
apol added inline comments.
INLINE COMMENTS
> ApplicationPage.qml:39
> + readonly property string donationURL: application.donationURL
> + readonly property string version: appInfo.application.isInstalled ? appInfo.application.installedVersion : appInfo.application.availableVersion
> +
Here actually we probably want to be a bit smarter. If it's updateable we probably want to reflect it as well.
> ApplicationPage.qml:354
> + // "Make a Donation" row
> + QQC2.Label {
> + visible: donationURL.length > 0
How about:
QQC2.Label {
visible: donationButton.visible
Layout.alignment: Qt.AlignRight
text: i18n("Make a Donation:")
}
LinkButton {
id: donationButton
visible: text.length > 0
text: application.donationURL
onClicked: Qt.openUrlExternally(donationURL)
elide: Text.ElideRight
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
}
This way we don't need to have random top-level properties for every single thing.
Also note that referring to properties by name is considered expensive. So it should have been `appInfo.donationURL)`.
REPOSITORY
R134 Discover Software Store
REVISION DETAIL
https://phabricator.kde.org/D10131
To: ngraham, apol, #discover_software_store
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180127/9a6b9048/attachment-0001.html>
More information about the Plasma-devel
mailing list