Changeset View
Changeset View
Standalone View
Standalone View
src/controls/Heading.qml
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 50 | QQC2.Label { | |||
---|---|---|---|---|---|
58 | property int level: 1 | 58 | property int level: 1 | ||
59 | 59 | | |||
60 | /** | 60 | /** | ||
61 | * step: int | 61 | * step: int | ||
62 | * adjust the point size in between a level and another. | 62 | * adjust the point size in between a level and another. | ||
63 | */ | 63 | */ | ||
64 | property int step: 2 | 64 | property int step: 2 | ||
65 | 65 | | |||
66 | lineHeight: 1.2 | | |||
67 | font.pointSize: headerPointSize(level) | 66 | font.pointSize: headerPointSize(level) | ||
68 | font.weight: level <= 4 ? Font.Light : Font.Normal | 67 | font.weight: level <= 4 ? Font.Light : Font.Normal | ||
69 | wrapMode: Text.WordWrap | 68 | wrapMode: Text.WordWrap | ||
70 | 69 | | |||
71 | function headerPointSize(l) { | 70 | function headerPointSize(l) { | ||
72 | var n = Theme.defaultFont.pointSize; | 71 | var n = Theme.defaultFont.pointSize; | ||
73 | var s; | 72 | var s; | ||
74 | if (l > 4) { | 73 | if (l > 4) { | ||
Show All 9 Lines |