D29463: Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi

2020-06-09 Thread Nathaniel Graham
ngraham closed this revision.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29463

To: Zren, #kirigami, mart
Cc: davidre, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29463: Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi

2020-06-08 Thread David Redondo
davidre added a comment.


  Ping

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29463

To: Zren, #kirigami, mart
Cc: davidre, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29463: Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi

2020-05-19 Thread Marco Martin
mart accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29463

To: Zren, #kirigami, mart
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29463: Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi

2020-05-05 Thread Chris Holland
Zren added reviewers: Kirigami, mart.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29463

To: Zren, #kirigami, mart
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29463: Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi

2020-05-05 Thread Chris Holland
Zren created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
Zren requested review of this revision.

REVISION SUMMARY
  I recently noticed that `Kirigami.Units.devicePixelRatio` was `1.3` even 
though I was at the default 96dpi when writing a widget's config.
  
  F8287886: 2020-05-05___19-00-48.png 
  
  There's 4 different `Units.qml`, and I'm not certain which does what. 2 are 
in `krigiami` and the other 2 are in `plasma-framework`.
  
$ locate /Units.qml | grep /usr/
/usr/lib/qt/qml/org/kde/kirigami.2/Units.qml
/usr/lib/qt/qml/org/kde/kirigami.2/styles/Plasma/Units.qml
/usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop/Units.qml
/usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml
  
  
  
  - 2 years ago `kirigami/src/controls/Units.qml` 
 
(`/usr/lib/qt/qml/org/kde/kirigami.2/Units.qml`) was changed from `13/10 = 1.3` 
to multiply by `13*0.75` so that `9.75/10 = 0.975` (then `max(1, 0.975) = 1`).
  
  -
  
  There's 2 files owned by `plasma-framework`. The `/styles/Plasma/Units.qml` 
binds PlasmaCore's `units.devicePixelRatio`, so that leaves 
`/styles/org.kde.desktop.plasma/Units.qml`.
  
$ pacman -Qo 
/usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml
/usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml 
is owned by plasma-framework 5.69.0-2
  
  This patch edits the `org.kde.desktop.plasma` style, and fixes `qmlscene 
KirigamiDevicePixelRatioTest.qml`, and `plasmashell` widget configs, and 
`plasmoidviewer` widget configs.
  
  The Kirigami patch is D29462 

TEST PLAN
  You can edit 
`/usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml` 
then run:
  
  - https://gist.github.com/Zren/621338b8cda7c550d7b43f8ea1ba71a7
  - `qmlscene KirigamiDevicePixelRatioTest.qml`
  
  and `Kirigami.Units.devicePixelRatio` should equal `1`.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29463

AFFECTED FILES
  src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml
  src/declarativeimports/kirigamiplasmastyle/Units.qml

To: Zren
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns