Go to file
Chris Holland 7005ef0ec8 Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi
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}

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`](https://github.com/KDE/kirigami/blame/master/src/controls/Units.qml#L75) (`/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`.

Reviewers: #kirigami, mart

Reviewed By: #kirigami, mart

Subscribers: davidre, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D29463
2020-06-09 08:46:15 -06:00
autotests [plasma-framework] make it compiles without foreach 2020-04-17 06:47:04 +02:00
cmake Support gzipping of svgz also on windows, using 7z 2019-04-12 22:45:16 +02:00
docs API dox: adapt kapidox & ecm_add_qch settings to new deprecation macros 2019-10-22 19:41:15 +02:00
examples SVN_SILENT made messages (.desktop file) - always resolve ours 2020-05-31 20:19:54 +02:00
src Fix Kirigami.Units.devicePixelRatio=1.3 when it should be 1.0 at 96dpi 2020-06-09 08:46:15 -06:00
templates SVN_SILENT made messages (.desktop file) - always resolve ours 2020-05-31 20:19:54 +02:00
tests [plasma-framework] make it compiles without foreach 2020-04-17 06:47:04 +02:00
.gitignore GIT_SILENT: qtcreator created .cmake/ repo. 2020-02-12 07:18:27 +01:00
CMakeLists.txt GIT_SILENT Upgrade ECM and KF5 version requirements for 5.71.0 release. 2020-06-06 19:36:27 +00:00
COPYING Add COPYING and COPYING.LIB files 2013-12-23 18:39:10 +00:00
COPYING.LIB Add COPYING and COPYING.LIB files 2013-12-23 18:39:10 +00:00
ExtraDesktop.sh i18n: translate kdevtemplate for qml-plasmoid too 2016-10-08 14:25:03 +02:00
KF5PlasmaConfig.cmake.in Use ecm_setup_qtplugin_macro_names 2018-03-21 00:55:32 +01:00
KF5PlasmaMacros.cmake new macro plasma_install_bundled_package 2018-03-20 16:52:18 +01:00
metainfo.yaml Add FreeBSD to metainfo.yaml. 2016-11-23 20:39:07 +01:00
README.md Add/update first line of README.md to be a short description, useful for inqlude 2015-07-27 19:41:21 +02:00

Plasma Framework

Foundational libraries, components, and tools of the Plasma workspaces

Introduction

The plasma framework provides the following:

  • QML components
  • A C++ library: libplasma
  • Script engines

QML components

org.kde.plasma.core

Bindings for libplasma functionality, such as DataEngine and FrameSvg, see @ref core.

org.kde.plasma.components

Graphical components for common items such as buttons, lineedits, tabbars and so on. Compatible subset of the MeeGo components used on the N9, see @ref plasmacomponents.

org.kde.plasma.extras

Extra graphical components that extend org.kde.plasma.components but are not in the standard api, see @ref plasmaextracomponents.

org.kde.plasma.plasmoid

Attached properties for manipulating the current applet or containment, see @ref libplasmaquick

libplasma

This C++ library provides:

  • rendering of SVG themes
  • loading of files from a certain filesystem structure: packages
  • data access through data engines
  • loading of the plugin structure of the workspace: containments and applets

See @ref libplasma.

Script engines

Provides support to create applets or containments in various scripting languages.