veskuh / Tweetian

A feature-rich Twitter app for smartphones developed using Qt/QML
GNU General Public License v3.0
50 stars 26 forks source link

Link style changed #101

Closed Morpog closed 10 years ago

Morpog commented 10 years ago

Removed italic and added underline to URL links. and changed color of URL link slightly. I also tried to change link URL and #/@ link colors to theme colors, but I failed at importing silica theme. As soon as I try something like:

.pragma library .import Sailfish.Silica.Theme 1.0 as SilicaTheme

Qt.include("Calculations.js")

function linkText(text, href, italic) { var html = ""; var color_link = SilicaTheme.primaryColor; if (italic) html = "<a style=\"color: "+color_link+"; text-decoration: underline\" href=\"%1\">%2"; else html = "<a style=\"color: DarkGray; text-decoration: none\" href=\"%1\">%2";

return html.arg(href).arg(text);

}

I get an non functioning parsing with this error: [W] unknown:133 - qrc:/qml/tweetian-harmattan/WorkerScript/TweetsParser.js:133: ReferenceError: parseTweet is not defined

Maybe someone else with more coding skills can do a follow up.

veskuh commented 10 years ago

I'm not so sure if this looks better than before, but underline is the same as the platform uses for links so let's go with this. Thanks.