Reply
Thread Tools
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#2541
Originally Posted by coderus View Post
One big question: why you patch /usr/lib/qt5/qml/Sailfish/Silica/SilicaWebView.qml file???
If you read the original thread on TJC, you'd understand that I didn't write/edit or choose the files used, the author of that original post provided the data.

This is not a case of admonishing myself of any responsibility, but I took the given files and with some messing around, made a working patch

So, you tell me why that file didn't need patching?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#2542
Originally Posted by kneeli View Post
@Markkyboy

I do prefer to increase the font size for text mail:

/usr/share/jolla-email/pages/PlainTextViewer.qml

from:
Code:
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeSmall : Theme.fontSizeExtraSmall
to:
Code:
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeMedium : Theme.fontSizeSmall



Some time before, there was one option more in silica webview to change:

/usr/lib/qt5/qml/Sailfish/Silica/SilicaWebView.qml

from:
Code:
color: webView.experimental.transparentBackground ? "transparent" : "white"
to:
Code:
color: webView.experimental.transparentBackground ? "transparent" : "transparent"
but since last update it may not necessary anymore.


I will try you're css file, because mine is very different. I'm exited. Thanks a lot for doing this job done!



I made also some changes on the htmlViewer component, because some emails got rendered totally unreadable, therefore I did the following changes:

/usr/share/jolla-email/pages/HtmlViewer.qml

from:
Code:
 // 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")
    }

to:

Code:
// 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
    }
Thanks kneeli, I will certainly look into making the changes you suggest. Please refer to the original post on TJC, as the original data is not mine or written by me; https://together.jolla.com/question/...-email-client/
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Posts: 16 | Thanked: 23 times | Joined on Jan 2016
#2543
Originally Posted by coderus View Post
One big question: why you patch /usr/lib/qt5/qml/Sailfish/Silica/SilicaWebView.qml file???
to make it possible to have transparent html email view.
 

The Following User Says Thank You to kneeli For This Useful Post:
Posts: 16 | Thanked: 23 times | Joined on Jan 2016
#2544
Thanks kneeli, I will certainly look into making the changes you suggest. Please refer to the original post on TJC, as the original data is not mine or written by me;
Yes I know this tread, I was the initiator of it.
 

The Following 3 Users Say Thank You to kneeli For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#2545
Originally Posted by kneeli View Post
Yes I know this tread, I was the initiator of it.
Lol, fair enough, the username wasn't familiar
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Posts: 16 | Thanked: 23 times | Joined on Jan 2016
#2546
Lol, fair enough, the username wasn't familiar
Maybe I'm bit paranoid, I do use my password generator for usernames as well O:-)
 

The Following 2 Users Say Thank You to kneeli For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#2547
Originally Posted by kneeli View Post
Maybe I'm bit paranoid, I do use my password generator for usernames as well O:-)
That's a good idea, I've never thought of that way of picking a username, nice one.

I'm attempting your suggestions now, but I'm tired an have managed to produce 2 RPM's that fail to install/apply.........yawn. Will try again tomorrow.

Thanks for the patch
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following 3 Users Say Thank You to Markkyboy For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#2548
Originally Posted by Markkyboy View Post
So, you tell me why that file didn't need patching?
/usr/share/jolla-email/pages/HtmlViewer.qml of course. No need to mess any other webkit-based browser view with your patch.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#2549
Originally Posted by kneeli View Post
to make it possible to have transparent html email view.
in the past email did not provide qml files, nowadays you can patch it. no need to mess systemwide plugins. please.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following 3 Users Say Thank You to coderus For This Useful Post:
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#2550
Originally Posted by kneeli View Post
@Markkyboy

I do prefer to increase the font size for text mail:

/usr/share/jolla-email/pages/PlainTextViewer.qml

from:
Code:
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeSmall : Theme.fontSizeExtraSmall
to:
Code:
font.pixelSize: Screen.sizeCategory >= Screen.Large ? Theme.fontSizeMedium : Theme.fontSizeSmall



Some time before, there was one option more in silica webview to change:

/usr/lib/qt5/qml/Sailfish/Silica/SilicaWebView.qml

from:
Code:
color: webView.experimental.transparentBackground ? "transparent" : "white"
to:
Code:
color: webView.experimental.transparentBackground ? "transparent" : "transparent"
but since last update it may not necessary anymore.


I will try you're css file, because mine is very different. I'm exited. Thanks a lot for doing this job done!



I made also some changes on the htmlViewer component, because some emails got rendered totally unreadable, therefore I did the following changes:

/usr/share/jolla-email/pages/HtmlViewer.qml

from:
Code:
 // 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")
    }

to:

Code:
// 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
    }
Kneeli - your code shown for HtmlViewer.qml does not match what I have. I'm on SFOS 2.2.0.29 - which version are you using?
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..

Last edited by Markkyboy; 2018-07-10 at 08:46.
 

The Following User Says Thank You to Markkyboy For This Useful Post:
Reply

Tags
patchmanager, sailfish os

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:55.