info kcm: make webpage optional

On some systems, the webpage info may be empty. In the UI, this would
lead to a broken button (since the UI is not visible). So let's hide
this button when the URL isn't set anyway.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
Sebastian Kügler 2025-04-09 20:26:12 +02:00
parent 9707f503a2
commit 8a70d7c50d

View file

@ -48,9 +48,13 @@ KCM.SimpleKCM {
description: kcm.distroInfo.name description: kcm.distroInfo.name
} }
FormCard.FormDelegateSeparator {} FormCard.FormDelegateSeparator {
visible: webpageDelegate.visible
}
FormCard.FormButtonDelegate { FormCard.FormButtonDelegate {
id: webpageDelegate
visible: kcm.distroInfo.homeUrl
text: i18n("Webpage") text: i18n("Webpage")
description: kcm.distroInfo.homeUrl description: kcm.distroInfo.homeUrl
onClicked: { onClicked: {