A bit more text, conditional alignment

This commit is contained in:
Sebastian Kügler 2014-01-27 18:22:54 +01:00
parent f374d2880d
commit 0928741416
2 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,7 @@ Item {
} }
PlasmaComponents.Label { PlasmaComponents.Label {
id: cheatLabel id: cheatLabel
text: "Cheating with the font size. This label scales with the devicePixelRatio <b>on top of</b> font rendering. Just to show how text scaling can work dynamically." text: "Cheating with the font size. This label scales with the devicePixelRatio <b>on top of</b> font rendering. Just to show how text scaling can work dynamically. Normal labels scale with the font size. For demonstration purposes we're faking scaled fonts here, to show how layouts' flows change."
font.pointSize: theme.defaultFont.pointSize * units.devicePixelRatio / 1.8 font.pointSize: theme.defaultFont.pointSize * units.devicePixelRatio / 1.8
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
anchors { anchors {
@ -92,7 +92,8 @@ Item {
Flow { Flow {
anchors { anchors {
left: parent.left left: parent.left
bottom: parent.bottom top: cheatLabel.height > apeImage.height ? cheatLabel.bottom : apeImage.bottom
topMargin: units.largeSpacing
right: parent.right right: parent.right
} }
//height: _h //height: _h

View File

@ -82,11 +82,12 @@ Item {
id: dprSlider id: dprSlider
anchors { anchors {
bottom: parent.bottom bottom: parent.bottom
bottomMargin: units.largeSpacing/2
left: sliderLabel.right left: sliderLabel.right
right: parent.right right: parent.right
} }
minimumValue: 0 minimumValue: 0
maximumValue: 400 maximumValue: 300
stepSize: 20 stepSize: 20
focus: true focus: true
onValueChanged: { onValueChanged: {