From aa4aa72d6322662d61a23ca1ae595cc062af0c27 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 17 Nov 2017 16:46:22 +0100 Subject: [PATCH] Synchronize the component with the one in Kirigami Summary: Using the height property together with paintedHeight had binding loops. Reviewers: #plasma, mart Reviewed By: #plasma, mart Subscribers: broulik, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D8870 --- .../plasmaextracomponents/qml/Heading.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmaextracomponents/qml/Heading.qml b/src/declarativeimports/plasmaextracomponents/qml/Heading.qml index 032a81c49..7da3498c1 100644 --- a/src/declarativeimports/plasmaextracomponents/qml/Heading.qml +++ b/src/declarativeimports/plasmaextracomponents/qml/Heading.qml @@ -48,14 +48,19 @@ Label { id: heading /** + * level: int * The level determines how big the section header is display, values * between 1 (big) and 5 (small) are accepted */ property int level: 1 + /** + * step: int + * adjust the point size in between a level and another. + */ property int step: 2 - height: Math.round(paintedHeight * 1.2) + lineHeight: 1.2 font.pointSize: headerPointSize(level) font.weight: Font.Light wrapMode: Text.WordWrap