diff --git a/src/qml/EntryPage.qml b/src/qml/EntryPage.qml index abae7f5c..0085ef33 100644 --- a/src/qml/EntryPage.qml +++ b/src/qml/EntryPage.qml @@ -53,7 +53,7 @@ Kirigami.ScrollablePage { } Controls.Label { - id: text + id: textLabel Layout.margins: Kirigami.Units.gridUnit text: page.entry.content baseUrl: page.entry.baseUrl @@ -62,7 +62,8 @@ Kirigami.ScrollablePage { Layout.fillWidth: true Layout.fillHeight: true onLinkActivated: Qt.openUrlExternally(link) - //onWidthChanged: { text = entry.adjustedContent(width, font.pixelSize) } + onWidthChanged: { text = entry.adjustedContent(width, font.pixelSize) } + font.pointSize: SettingsManager && !(SettingsManager.articleFontUseSystem) ? SettingsManager.articleFontSize : Kirigami.Units.fontMetrics.font.pointSize } } diff --git a/src/qml/SettingsPage.qml b/src/qml/SettingsPage.qml index 8828f8ad..50e7cbc7 100644 --- a/src/qml/SettingsPage.qml +++ b/src/qml/SettingsPage.qml @@ -38,6 +38,7 @@ Kirigami.ScrollablePage { } } + // TODO: implement this /*Controls.CheckBox { id: autoDownload checked: SettingsManager.autoDownload @@ -47,5 +48,30 @@ Kirigami.ScrollablePage { onToggled: SettingsManager.autoDownload = checked }*/ + Kirigami.Heading { + Kirigami.FormData.isSection: true + text: i18n("Article") + } + + Controls.SpinBox { + id: articleFontSizeSpinBox + + enabled: !useSystemFontCheckBox.checked + value: SettingsManager.articleFontSize + Kirigami.FormData.label: i18n("Font size:") + from: 6 + to: 20 + + onValueModified: SettingsManager.articleFontSize = value + + } + + Controls.CheckBox { + id: useSystemFontCheckBox + checked: SettingsManager.articleFontUseSystem + text: i18n("Use system default") + + onToggled: SettingsManager.articleFontUseSystem = checked + } } }