Bug 368843 - kmail2 message view with qtwebengine hidpi is broken
Summary: kmail2 message view with qtwebengine hidpi is broken
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: UI (show other bugs)
Version: Git (master)
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-15 11:53 UTC by Bruno Friedmann
Modified: 2016-09-16 12:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.3.2


Attachments
Layout of message body on hidpi screen (788.26 KB, image/png)
2016-09-15 11:55 UTC, Bruno Friedmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Friedmann 2016-09-15 11:53:48 UTC
With hidpi 144 or more (I've 168 and 288 dpi screens) the display message viewport is completely broken.

Seems kmail2 code doesn't apply this simple fix
https://bugreports.qt.io/browse/QTBUG-54114



Mention High-DPI on WebEngine documentation, and recommend to set

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling)

before creating Q*Application.

THis is actually recommended for all applications (see http://doc.qt.io/qt-5/highdpi.html). For WebEngineView specifically, it makes sure that the default scaling factor of pages is reasonable.


Reproducible: Always

Steps to Reproduce:
1. open kmail2 with qtwebengine on high dpi screen
2. cry :-)
3. loose your eyes :-))


Actual Results:  
Wrong scale (dpi and scale factor) in message list
So click on link is no more feasible, copy and paste is completely wrong etc.
can't activate click to read pure html message and so on.

Expected Results:  
Wrong on hipdi as well on normal 96dpi

Screenshot coming
Comment 1 Bruno Friedmann 2016-09-15 11:55:20 UTC
Created attachment 101098 [details]
Layout of message body on hidpi screen

Layout of message body on hidpi screen .
Comment 2 Laurent Montel 2016-09-15 16:19:10 UTC
wrong we use "QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling)"
Comment 3 Wolfgang Bauer 2016-09-15 21:04:41 UTC
(In reply to Laurent Montel from comment #2)
> wrong we use "QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling)"

But maybe too late? ;-)

The docs say:
This attribute must be set before Q(Gui)Application is constructed

Anyway, I have a patch ready (as you may know meanwhile.
Just waiting for the reporter to try, then I will submit a review request.
Comment 4 Laurent Montel 2016-09-16 12:04:14 UTC
Git commit 79ba2963291aa6e8fa6e5eecc62403463f6adb34 by Montel Laurent.
Committed on 16/09/2016 at 11:08.
Pushed by mlaurent into branch 'master'.

Fix kmail2 message view with qtwebengine hidpi is broken
FIXED-IN: 5.3.2

M  +1    -1    src/main.cpp

http://commits.kde.org/kmail/79ba2963291aa6e8fa6e5eecc62403463f6adb34