Use UCUnits when converting TWIPs in pixels (and vice versa)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Document Viewer App |
Fix Released
|
Medium
|
Stefano Verzegnassi |
Bug Description
We currently use DPIs when converting TWIPs (the size unit used in LibreOffice) in pixels (used for painting the document on the screen).
On desktop everything works as expected but on mobile devices we get some strange result.
Aquaris E4.5:
http://
One Plus One (same also on Meizu MX4):
http://
DESIRED SOLUTION:
We shouldn't use DPIs as reference while performing such convertion.
We should use UCUnits from the Ubuntu UI Toolkit instead: as long as DocViewer runs on a desktop or an Ubuntu mobile device, they grant the best result, since they also take in account the different form factor of the device. Extra, UCUnits *is* convergence-ready.
Related branches
- Jenkins Bot: Approve (continuous-integration)
- Alan Pope πΊπ§π± π¦ (community): Needs Fixing
-
Diff: 1001 lines (+647/-86)9 files modifiedpo/com.ubuntu.docviewer.pot (+13/-5)
src/app/qml/loView/ZoomSelector.qml (+66/-28)
src/plugin/libreofficetoolkit-qml-plugin/CMakeLists.txt (+1/-0)
src/plugin/libreofficetoolkit-qml-plugin/loview.cpp (+183/-32)
src/plugin/libreofficetoolkit-qml-plugin/loview.h (+24/-11)
src/plugin/libreofficetoolkit-qml-plugin/qml/Viewer.qml (+23/-1)
src/plugin/libreofficetoolkit-qml-plugin/twips.h (+36/-9)
src/plugin/libreofficetoolkit-qml-plugin/ucunits.cpp (+241/-0)
src/plugin/libreofficetoolkit-qml-plugin/ucunits.h (+60/-0)
tags: | added: loviewer |
Changed in ubuntu-docviewer-app: | |
status: | Fix Committed → Fix Released |
Fix committed into lp:ubuntu-docviewer-app at revision 274, scheduled for release in ubuntu- docviewer- app, milestone ww02-2016