mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
7b320a7d34
- add sizing information for fonts and fontmetrics - compute devicePixelRatio from fontmetrics This shows that Android doesn't give us accurate information about the default font (hence the Text items being way too small) and a wrong Screen.devicePixelRatio, which we can actually compute ourselves. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
58 lines
698 B
QML
58 lines
698 B
QML
import QtQuick 2.5
|
|
import QtQuick.Layouts 1.1
|
|
|
|
GridLayout {
|
|
id: themetest
|
|
columns: 2
|
|
|
|
Label {
|
|
Layout.columnSpan: 2
|
|
Layout.fillHeight: true
|
|
text: "Theme Information"
|
|
}
|
|
|
|
FontMetrics {
|
|
id: fm
|
|
}
|
|
|
|
Label {
|
|
text: "units.gridUnit:"
|
|
}
|
|
Label {
|
|
text: units.gridUnit
|
|
}
|
|
|
|
Label {
|
|
text: "units.devicePixelRatio:"
|
|
}
|
|
Label {
|
|
text: units.devicePixelRatio
|
|
}
|
|
|
|
Label {
|
|
text: "FontMetrics pointSize:"
|
|
}
|
|
Label {
|
|
text: fm.font.pointSize
|
|
}
|
|
|
|
Label {
|
|
text: "FontMetrics pixelSize:"
|
|
}
|
|
Label {
|
|
text: fm.height
|
|
|
|
}
|
|
|
|
Label {
|
|
text: "hand-computed devicePixelRatio:"
|
|
}
|
|
Label {
|
|
text: fm.height / fm.font.pointSize
|
|
}
|
|
|
|
Item {
|
|
Layout.columnSpan: 2
|
|
Layout.fillHeight: true
|
|
}
|
|
}
|