mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
QML UI: smaller fonts on narrow screens
This may be excessive, but it fixes the issue with the German localization on some narrow screens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fd27c3fa23
commit
13dbbd3085
1 changed files with 7 additions and 0 deletions
|
@ -42,6 +42,13 @@ Kirigami.ApplicationWindow {
|
||||||
|
|
||||||
FontMetrics {
|
FontMetrics {
|
||||||
id: fontMetrics
|
id: fontMetrics
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (Math.round(rootItem.width / Kirigami.Units.gridUnit) < 20) {
|
||||||
|
fontMetrics.font.pointSize = fontMetrics.font.pointSize * 2 / 3
|
||||||
|
Kirigami.Theme.defaultFont.pointSize = fontMetrics.font.pointSize
|
||||||
|
console.log("Reduce font size for narrow screens: " + fontMetrics.font.pointSize)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
|
|
Loading…
Reference in a new issue