[SailfishDevel] Link in Text component

Tigre-Bleu devel at tigre-bleu.net
Sun Nov 10 12:04:19 UTC 2013


It's looking a lot better like this.

Thanks for the workaround.

Antoine

----- Mail original -----
De: "Martin Grimme" <martin.grimme at gmail.com>
À: "Sailfish OS Developers" <devel at lists.sailfishos.org>
Envoyé: Dimanche 10 Novembre 2013 10:03:05
Objet: Re: [SailfishDevel] Link in Text component

Hi,

2013/11/10, Tigre-Bleu <devel at tigre-bleu.net>:
> If a link is displayed in a Text component with html, it is displayed
> underlined with an ugly blue from the old internet ages...

You're right. It looks really ugly, and probably comes from the depths of Qt.
However, you can use rich text in Text or Label to fix this, e.g.:

        Label {
            color: Theme.primaryColor
            textFormat: Text.RichText
            text: "<style>a:link { color: " + Theme.highlightColor +
"; }</style>"
                  + "This text contains a <a href='#'>Link</a>"
        }


Cheers,
Martin
_______________________________________________
SailfishOS.org Devel mailing list


More information about the Devel mailing list