diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-10-12 14:25:22 +0200 |
---|---|---|
committer | Jan Mulder <jlmulder@xs4all.nl> | 2017-10-17 15:32:27 +0200 |
commit | d623eccdefa8f19da76bd853ec16cba108aa37d1 (patch) | |
tree | 4e222c2845567b2f3c83836c1f34085bf20f627f /mobile-widgets/qml/ThemeTest.qml | |
parent | f7da06c76bfab30fb21224955626ba74095251ba (diff) | |
download | subsurface-d623eccdefa8f19da76bd853ec16cba108aa37d1.tar.gz |
mobile: silence deprecated messages in logging about Kirigami.Label
Commit 8f6827ab122 brought a new SHA for Kirigami, but that introduces
a very noisy logging of "Kirigami.Label is deprecated. Use
QtQuickControls2.Label instead".
So, thats what done here.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qml/ThemeTest.qml')
-rw-r--r-- | mobile-widgets/qml/ThemeTest.qml | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/mobile-widgets/qml/ThemeTest.qml b/mobile-widgets/qml/ThemeTest.qml index 5b832d8ce..3abfa42ca 100644 --- a/mobile-widgets/qml/ThemeTest.qml +++ b/mobile-widgets/qml/ThemeTest.qml @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 import QtQuick 2.5 import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.0 as Controls import QtQuick.Window 2.2 import org.kde.kirigami 2.0 as Kirigami @@ -27,31 +28,31 @@ Kirigami.Page { id: fm } - Kirigami.Label { + Controls.Label { text: "Geometry (pixels):" } - Kirigami.Label { + Controls.Label { text: rootItem.width + "x" + rootItem.height } - Kirigami.Label { + Controls.Label { text: "Geometry (gridUnits):" } - Kirigami.Label { + Controls.Label { text: Math.round(rootItem.width / Kirigami.Units.gridUnit) + "x" + Math.round(rootItem.height / Kirigami.Units.gridUnit) } - Kirigami.Label { + Controls.Label { text: "Units.gridUnit:" } - Kirigami.Label { + Controls.Label { text: Kirigami.Units.gridUnit } - Kirigami.Label { + Controls.Label { text: "Units.devicePixelRatio:" } - Kirigami.Label { + Controls.Label { text: Screen.devicePixelRatio } @@ -61,56 +62,56 @@ Kirigami.Page { Layout.columnSpan: 2 } - Kirigami.Label { + Controls.Label { text: "FontMetrics pointSize:" } - Kirigami.Label { + Controls.Label { text: fm.font.pointSize } - Kirigami.Label { + Controls.Label { text: "FontMetrics pixelSize:" } - Kirigami.Label { + Controls.Label { text: Number(fm.height).toFixed(2) } - Kirigami.Label { + Controls.Label { text: "FontMetrics devicePixelRatio:" } - Kirigami.Label { + Controls.Label { text: Number(fm.height / fm.font.pointSize).toFixed(2) } - Kirigami.Label { + Controls.Label { text: "Text item pixelSize:" } Text { text: font.pixelSize } - Kirigami.Label { + Controls.Label { text: "Text item pointSize:" } Text { text: font.pointSize } - Kirigami.Label { + Controls.Label { text: "Pixel density:" } Text { text: Number(Screen.pixelDensity).toFixed(2) } - Kirigami.Label { + Controls.Label { text: "Height of default font:" } Text { text: Number(font.pixelSize / Screen.pixelDensity).toFixed(2) + "mm" } - Kirigami.Label { + Controls.Label { text: "2cm x 2cm square:" } Rectangle { @@ -119,7 +120,7 @@ Kirigami.Page { color: "black" } - Kirigami.Label { + Controls.Label { Layout.columnSpan: 2 Layout.fillHeight: true } |