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

View File

@ -38,6 +38,7 @@ Column {
} }
Row { Row {
spacing: units.gridUnit/2
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: boxesCheck id: boxesCheck
text: "Show Boxes" text: "Show Boxes"
@ -46,6 +47,11 @@ Column {
id: fontCheck id: fontCheck
text: checked ? "Oxygen-Sans" : "Comme" text: checked ? "Oxygen-Sans" : "Comme"
} }
PlasmaComponents.CheckBox {
id: lightCheck
//tristate: true
text: checked ? "Light" : "Regular"
}
PlasmaComponents.CheckBox { PlasmaComponents.CheckBox {
id: paintedHeightCheck id: paintedHeightCheck
text: "Painted Height" text: "Painted Height"
@ -56,24 +62,45 @@ Column {
FontGizmo { FontGizmo {
id: giz1 id: giz1
font.family: "Oxygen-Sans" font.pointSize: theme.smallestFont.pointSize
//font.family: "Oxygen-Sans"
} }
FontGizmo { FontGizmo {
id: giz2 id: giz2
font.family: "Comme" font.pixelSize: units.gridUnit * 1
} }
FontGizmo { FontGizmo {
id: giz3 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 { Rectangle {
width: parent.width width: parent.width
height: units.gridUnit * 6 height: units.gridUnit * 6
color: "transparent"
border.width: boxesCheck.checked ? 1 : 0 border.width: boxesCheck.checked ? 1 : 0
border.color: "red" 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.family: fontCheck.text
font.pointSize: 24 font.pointSize: 24
verticalAlignment: Text.AlignTop verticalAlignment: Text.AlignTop
@ -101,7 +129,7 @@ Column {
font.pixelSize: height font.pixelSize: height
anchors { anchors {
left: img.right left: img.right
leftMargin: units.gridUnit leftMargin: units.gridUnit / 2
top: img.top top: img.top
} }
} }

View File

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