More refined font tests in testtheme applets

This commit is contained in:
Sebastian Kügler 2014-03-26 01:10:41 +01:00
parent 84a212469f
commit 993d4e56c0
3 changed files with 53 additions and 8 deletions

View File

@ -28,13 +28,27 @@ Text {
renderType: Text.NativeRendering
font.pointSize: 22
font.family: theme.defaultFont.family
text: "Lesley. (" + font.family + ")"
//font.family: theme.defaultFont.family
font.family: fontCheck.text
font.weight: lightCheck.checked ? Font.Light : Font.Normal
text: "Lesley 40:83 - (" + font.family + ")"
height: paintedHeightCheck.checked ? paintedHeight : 22
//anchors.fill: parent
//spacing: units.smallSpacing/2
verticalAlignment: Text.AlignTop
Rectangle {
color: "yellow"
visible: boxesCheck.checked
height: 1
width: paintedWidth
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
}
}
Rectangle {
color: "transparent"
border.width: 1

View File

@ -38,6 +38,7 @@ Column {
}
Row {
spacing: units.gridUnit/2
PlasmaComponents.CheckBox {
id: boxesCheck
text: "Show Boxes"
@ -46,6 +47,11 @@ Column {
id: fontCheck
text: checked ? "Oxygen-Sans" : "Comme"
}
PlasmaComponents.CheckBox {
id: lightCheck
//tristate: true
text: checked ? "Light" : "Regular"
}
PlasmaComponents.CheckBox {
id: paintedHeightCheck
text: "Painted Height"
@ -56,24 +62,45 @@ Column {
FontGizmo {
id: giz1
font.family: "Oxygen-Sans"
font.pointSize: theme.smallestFont.pointSize
//font.family: "Oxygen-Sans"
}
FontGizmo {
id: giz2
font.family: "Comme"
font.pixelSize: units.gridUnit * 1
}
FontGizmo {
id: giz3
font.family: "Oxygen Mono"
font.pixelSize: units.gridUnit * 2
}
FontGizmo {
id: giz4
font.pixelSize: units.gridUnit * 2
text: "AlignTop"
verticalAlignment: Text.AlignTop
}
FontGizmo {
id: giz5
font.pixelSize: units.gridUnit * 2
text: "AlignVCenter"
verticalAlignment: Text.AlignVCenter
}
// FontGizmo {
// id: giz3
// font.family: "Oxygen Mono"
//
// }
//
Rectangle {
width: parent.width
height: units.gridUnit * 6
color: "transparent"
border.width: boxesCheck.checked ? 1 : 0
border.color: "red"
@ -88,8 +115,9 @@ Column {
}
}
PlasmaComponents.Label {
PlasmaExtras.Title {
font.weight: lightCheck.checked ? Font.Light : Font.Normal
font.family: fontCheck.text
font.pointSize: 24
verticalAlignment: Text.AlignTop
@ -101,7 +129,7 @@ Column {
font.pixelSize: height
anchors {
left: img.right
leftMargin: units.gridUnit
leftMargin: units.gridUnit / 2
top: img.top
}
}

View File

@ -29,6 +29,9 @@ Item {
property int cwidth: themePage.width / 1.2
property int _m: units.gridUnit / 2 * units.devicePixelRatio
anchors {
margins: units.largeSpacing
}
Column {
id: col
spacing: _m