100% consistency with kirigami heading sizing
reviewed-by: VDG and Nate
This commit is contained in:
parent
b34b92346f
commit
02d5c8a19f
@ -58,7 +58,7 @@ Label {
|
|||||||
* step: int
|
* step: int
|
||||||
* adjust the point size in between a level and another.
|
* adjust the point size in between a level and another.
|
||||||
*/
|
*/
|
||||||
property int step: 2
|
property int step: 0
|
||||||
|
|
||||||
lineHeight: 1.2
|
lineHeight: 1.2
|
||||||
font.pointSize: headerPointSize(level)
|
font.pointSize: headerPointSize(level)
|
||||||
@ -69,13 +69,17 @@ Label {
|
|||||||
function headerPointSize(l) {
|
function headerPointSize(l) {
|
||||||
var n = theme.defaultFont.pointSize;
|
var n = theme.defaultFont.pointSize;
|
||||||
var s;
|
var s;
|
||||||
if (l > 4) {
|
switch (l) {
|
||||||
s = n
|
case 1:
|
||||||
} else if (l < 2) {
|
return Math.round(n * 1.80) + step;
|
||||||
s = n + (5*step)
|
case 2:
|
||||||
} else {
|
return Math.round(n * 1.30) + step;
|
||||||
s = n + ((5-level)*2)
|
case 3:
|
||||||
}
|
return Math.round(n * 1.20) + step;
|
||||||
return s;
|
case 4:
|
||||||
|
return Math.round(n * 1.10) + step;
|
||||||
|
default:
|
||||||
|
return n + step;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user