Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/plasmaextracomponents/qml/Heading.qml
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 47 | Label { | |||
---|---|---|---|---|---|
57 | /** | 57 | /** | ||
58 | * step: int | 58 | * step: int | ||
59 | * adjust the point size in between a level and another. | 59 | * adjust the point size in between a level and another. | ||
60 | */ | 60 | */ | ||
61 | property int step: 0 | 61 | property int step: 0 | ||
62 | 62 | | |||
63 | lineHeight: 1.2 | 63 | lineHeight: 1.2 | ||
64 | font.pointSize: headerPointSize(level) | 64 | font.pointSize: headerPointSize(level) | ||
65 | font.weight: level <= 4 ? Font.Light : Font.Normal | | |||
66 | font.styleName: level <= 4 ? "Light" : "Regular" | | |||
67 | wrapMode: Text.WordWrap | 65 | wrapMode: Text.WordWrap | ||
68 | 66 | | |||
69 | function headerPointSize(l) { | 67 | function headerPointSize(l) { | ||
70 | var n = theme.defaultFont.pointSize; | 68 | var n = theme.defaultFont.pointSize; | ||
71 | var s; | 69 | var s; | ||
72 | switch (l) { | 70 | switch (l) { | ||
73 | case 1: | 71 | case 1: | ||
74 | return Math.round(n * 1.80) + step; | 72 | return Math.round(n * 1.80) + step; | ||
Show All 11 Lines |