| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeSmall : Theme.fontSizeExtraSmall
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeMedium : Theme.fontSizeSmall
color: webView.experimental.transparentBackground ? "transparent" : "white"
color: webView.experimental.transparentBackground ? "transparent" : "transparent"
// Respect viewport meta tag if exists
if (!hasViewportMetaTag(htmlBody)) {
// This affects only to layouts that do not have width defined in body content.
// Smaller content layout gets scaled up to WebView's width. Basically meaning that
// html text emails will get scaled up by factor (1.5*Theme.pixelRatio) rounded to nearest half.
// With higher scale factor content layouts starts touching edges of WebView and that hinders
// legibility. Thus, this 1.5 base factor.
var scale = Math.round((1.5 * Theme.pixelRatio) / .5) * .5
experimental.customLayoutWidth = width / scale
} else {
experimental.customLayoutWidth = width
}
// reload html
loadHtml(htmlBody, "file:///usr/share/jolla-email")
}
// Respect viewport meta tag if exists
//if (!hasViewportMetaTag(htmlBody)) {
// This affects only to layouts that do not have width defined in body content.
// Smaller content layout gets scaled up to WebView's width. Basically meaning that
// html text emails will get scaled up by factor (1.5*Theme.pixelRatio) rounded to nearest half.
// With higher scale factor content layouts starts touching edges of WebView and that hinders
// legibility. Thus, this 1.5 base factor.
//var scale = Math.round((1.5 * Theme.pixelRatio) / .5) * .5
//experimental.customLayoutWidth = webView.width / scale
//} else {
experimental.customLayoutWidth = 350
//}
// reload html
//loadHtml(htmlBody, "file:///usr/share/jolla-email")
webView.loadHtml(htmlBody, "file:///usr/share/jolla-email")
onScreen = true
}
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
| The Following User Says Thank You to kneeli For This Useful Post: | ||
| The Following 3 Users Say Thank You to kneeli For This Useful Post: | ||
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||
| The Following 2 Users Say Thank You to kneeli For This Useful Post: | ||
| The Following 3 Users Say Thank You to Markkyboy For This Useful Post: | ||
| The Following 2 Users Say Thank You to coderus For This Useful Post: | ||
| The Following 3 Users Say Thank You to coderus For This Useful Post: | ||
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeSmall : Theme.fontSizeExtraSmall
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeMedium : Theme.fontSizeSmall
color: webView.experimental.transparentBackground ? "transparent" : "white"
color: webView.experimental.transparentBackground ? "transparent" : "transparent"
// Respect viewport meta tag if exists
if (!hasViewportMetaTag(htmlBody)) {
// This affects only to layouts that do not have width defined in body content.
// Smaller content layout gets scaled up to WebView's width. Basically meaning that
// html text emails will get scaled up by factor (1.5*Theme.pixelRatio) rounded to nearest half.
// With higher scale factor content layouts starts touching edges of WebView and that hinders
// legibility. Thus, this 1.5 base factor.
var scale = Math.round((1.5 * Theme.pixelRatio) / .5) * .5
experimental.customLayoutWidth = width / scale
} else {
experimental.customLayoutWidth = width
}
// reload html
loadHtml(htmlBody, "file:///usr/share/jolla-email")
}
// Respect viewport meta tag if exists
//if (!hasViewportMetaTag(htmlBody)) {
// This affects only to layouts that do not have width defined in body content.
// Smaller content layout gets scaled up to WebView's width. Basically meaning that
// html text emails will get scaled up by factor (1.5*Theme.pixelRatio) rounded to nearest half.
// With higher scale factor content layouts starts touching edges of WebView and that hinders
// legibility. Thus, this 1.5 base factor.
//var scale = Math.round((1.5 * Theme.pixelRatio) / .5) * .5
//experimental.customLayoutWidth = webView.width / scale
//} else {
experimental.customLayoutWidth = 350
//}
// reload html
//loadHtml(htmlBody, "file:///usr/share/jolla-email")
webView.loadHtml(htmlBody, "file:///usr/share/jolla-email")
onScreen = true
}
| The Following User Says Thank You to Markkyboy For This Useful Post: | ||