diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-01-18 09:57:01 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-19 12:42:48 -0800 |
commit | 9be23b5f3f8373ba115f4e66e77c0537abe982b2 (patch) | |
tree | 34cd5055d78e45790a52d016da2351dc2056003d /mobile-widgets | |
parent | f678be03746aba4e1cedf60eef2a040beff20487 (diff) | |
download | subsurface-9be23b5f3f8373ba115f4e66e77c0537abe982b2.tar.gz |
mobile/UI: correctly update title bar font size
Simply force it to use the default font, which is bound to the
application font, which we SHOULD be updating when changing the regular
font size for the app, anyway.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/3rdparty/0005-breadcrumbs-get-better-font-size.patch | 21 | ||||
-rw-r--r-- | mobile-widgets/qml/main.qml | 9 |
2 files changed, 10 insertions, 20 deletions
diff --git a/mobile-widgets/3rdparty/0005-breadcrumbs-get-better-font-size.patch b/mobile-widgets/3rdparty/0005-breadcrumbs-get-better-font-size.patch index eceb3a4fd..b83326d48 100644 --- a/mobile-widgets/3rdparty/0005-breadcrumbs-get-better-font-size.patch +++ b/mobile-widgets/3rdparty/0005-breadcrumbs-get-better-font-size.patch @@ -5,26 +5,9 @@ Subject: [PATCH 05/11] breadcrumbs: get better font size Signed-off-by: Dirk Hohndel <dirk@hohndel.org> --- - src/controls/Units.qml | 5 +++++ src/controls/private/globaltoolbar/BreadcrumbControl.qml | 1 + - 2 files changed, 6 insertions(+) + 1 file changed, 1 insertion(+) -diff --git a/src/controls/Units.qml b/src/controls/Units.qml -index 615228a2..f957046f 100644 ---- a/src/controls/Units.qml -+++ b/src/controls/Units.qml -@@ -105,6 +105,11 @@ QtObject { - */ - readonly property int wheelScrollLines: 3 - -+ /** -+ * Use this to hardcode the font size of the global toolbar that Kirigami gets wrong -+ */ -+ property double defaultFontSize: fontMetrics.font.pixelSize -+ - /** - * metrics used by the default font - */ diff --git a/src/controls/private/globaltoolbar/BreadcrumbControl.qml b/src/controls/private/globaltoolbar/BreadcrumbControl.qml index ad80d222..c45db280 100644 --- a/src/controls/private/globaltoolbar/BreadcrumbControl.qml @@ -33,7 +16,7 @@ index ad80d222..c45db280 100644 } Kirigami.Heading { Layout.leftMargin: Kirigami.Units.largeSpacing -+ font.pixelSize: Math.max(1, Kirigami.Units.defaultFontSize) ++ font: Kirigami.Theme.defaultFont color: Kirigami.Theme.textColor verticalAlignment: Text.AlignVCenter wrapMode: Text.NoWrap diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 194391e9f..2ef9a4332 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -665,9 +665,16 @@ if you have network connectivity and want to sync your data to cloud storage."), } } + property double regularFontsize: subsurfaceTheme.regularPointSize + FontMetrics { id: fontMetrics - font.pointSize: subsurfaceTheme.regularPointSize + font.pointSize: regularFontsize + } + + onRegularFontsizeChanged: { + manager.appendTextToLog("regular font size changed to " + regularFontsize) + rootItem.font.pointSize = regularFontsize } function setupUnits() { |