dpi improvements for small text

- word-wrap and style the log message at the bottom, this should fix
  clipping of error messages down there
- introduce units.smallPointSize, which defines a small font size to use
  for toned-down display elements (e.g. the date in the dive list)
- No need to assign the default value to Text.text

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Sebastian Kügler 2015-11-12 00:18:57 +01:00 committed by Dirk Hohndel
parent ac1607dce2
commit 63cde0e120
3 changed files with 103 additions and 4 deletions

View file

@ -18,7 +18,8 @@ ApplicationWindow {
Theme.Units {
id: units
property int titlePointSize: fontMetrics.font.pointSize * 1.5
property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5)
property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.7)
}
@ -134,16 +135,16 @@ ApplicationWindow {
id: messageArea
height: childrenRect.height
Layout.fillWidth: true
color: theme.backgroundColor
Text {
id: message
color: theme.textColor
text: ""
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
styleColor: theme.textColor
font.pointSize: 10
font.pointSize: units.smallPointSize
}
}
}
}
}