diff options
author | Sebastian Kügler <sebas@kde.org> | 2015-11-06 21:50:52 +0000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-06 14:04:21 -0800 |
commit | 5fb054a17c74fe4aed950e4173aa05f43f0355cf (patch) | |
tree | 55a6894a4271c332b585f74ef803501cfe65bbbd /qt-mobile/theme/Units.qml | |
parent | c8227e200dbc6cfa45a13c5805c740bc7324bde2 (diff) | |
download | subsurface-5fb054a17c74fe4aed950e4173aa05f43f0355cf.tar.gz |
some changes from the upstream wip-branch
- remove the singleton usage, this will need a bit more magic in the
background. Not a huge problem since we're only using one instance
anyway, and the object itself is rather light
- hardcode gridUnit for now. I'd like to use TextMetrics or FontMetrics
there directly, but I'm not sure we can depend on Qt 5.4 and QtQuick
2.5.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/theme/Units.qml')
-rw-r--r-- | qt-mobile/theme/Units.qml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/qt-mobile/theme/Units.qml b/qt-mobile/theme/Units.qml index a8b8c629b..9efec3157 100644 --- a/qt-mobile/theme/Units.qml +++ b/qt-mobile/theme/Units.qml @@ -17,13 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import QtQuick 2.0 +import QtQuick 2.5 import QtQuick.Window 2.2 -pragma Singleton +//pragma Singleton -Object { +QtObject { id: units /** @@ -31,7 +31,7 @@ Object { * Given the screen has an accurate DPI settings, it corresponds to a width of * the capital letter M */ - property int gridUnit: textSpacer.height + property int gridUnit: 20 /** * units.iconSizes provides access to platform-dependent icon sizing @@ -50,7 +50,7 @@ Object { * Not devicePixelRation-adjusted:: * * desktop */ - property QtObject iconSizes: Object { + property QtObject iconSizes: QtObject { property int small: 16 * devicePixelRatio property int smallMedium: 22 * devicePixelRatio property int medium: 32 * devicePixelRatio @@ -95,8 +95,8 @@ Object { */ property int shortDuration: 150 - Text { - id: textSpacer - text: "M" - } +// property QtObject fontMetrics: FontMetrics { +// //id: textSpacer +// //text: "M" +// } } |