maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak (https://talk.maemo.org/showthread.php?t=92935)

Markkyboy 2018-07-09 17:13

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by coderus (Post 1546089)
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?

Markkyboy 2018-07-09 17:19

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by kneeli (Post 1546088)
@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/

kneeli 2018-07-09 18:09

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by coderus (Post 1546089)
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.

kneeli 2018-07-09 18:11

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

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.

Markkyboy 2018-07-09 19:00

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by kneeli (Post 1546095)
Yes I know this tread, I was the initiator of it.

Lol, fair enough, the username wasn't familiar ;)

kneeli 2018-07-09 20:07

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Lol, fair enough, the username wasn't familiar
Maybe I'm bit paranoid, I do use my password generator for usernames as well O:-)

Markkyboy 2018-07-09 20:22

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by kneeli (Post 1546104)
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 :)

coderus 2018-07-10 06:59

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by Markkyboy (Post 1546091)
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.

coderus 2018-07-10 06:59

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by kneeli (Post 1546094)
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.

Markkyboy 2018-07-10 08:36

Re: [WIP] App / Tweak: patchmanager a system-wide patching system + homescreen tweak
 
Quote:

Originally Posted by kneeli (Post 1546088)
@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?


All times are GMT. The time now is 12:02.

vBulletin® Version 3.8.8