From d4cc44f39bb60b5d2f6d446de0309eb0a374723e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 3 Apr 2017 14:18:04 +0200 Subject: Added units --- components/theme/contents/ui/Units.qml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 components/theme/contents/ui/Units.qml (limited to 'components/theme/contents') diff --git a/components/theme/contents/ui/Units.qml b/components/theme/contents/ui/Units.qml new file mode 100644 index 00000000..96216f82 --- /dev/null +++ b/components/theme/contents/ui/Units.qml @@ -0,0 +1,32 @@ +/* + Copyright (C) 2017 Michael Bohlender, + Copyright (C) 2017 Christian Mollekopf, + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +pragma Singleton + +import QtQuick 2.7 + +Item { + property int gridUnit: fontMetrics.height + property int smallSpacing: gridUnit/4 + property int largeSpacing: gridUnit + property variant fontMetrics: TextMetrics { + text: "M" + } +} + -- cgit v1.2.3