diff --git a/src/qml/Settings/GeneralSettingsPage.qml b/src/qml/Settings/GeneralSettingsPage.qml index cb552a24..b85e9953 100644 --- a/src/qml/Settings/GeneralSettingsPage.qml +++ b/src/qml/Settings/GeneralSettingsPage.qml @@ -181,16 +181,13 @@ Kirigami.ScrollablePage { } - RowLayout { - Layout.fillWidth: true - MobileForm.FormRadioDelegate { - id: markCustomUnreadNumberButton - checked: SettingsManager.markUnreadOnNewFeed === 1 - text: i18n("Mark most recent episodes as unplayed") - onToggled: SettingsManager.markUnreadOnNewFeed = 1 - } + MobileForm.FormRadioDelegate { + id: markCustomUnreadNumberButton + checked: SettingsManager.markUnreadOnNewFeed === 1 + text: i18n("Mark most recent episodes as unplayed") + onToggled: SettingsManager.markUnreadOnNewFeed = 1 - Controls.SpinBox { + trailing: Controls.SpinBox { Layout.rightMargin: Kirigami.Units.gridUnit id: markCustomUnreadNumberSpinBox enabled: markCustomUnreadNumberButton.checked @@ -221,27 +218,20 @@ Kirigami.ScrollablePage { title: i18n("Article") } - MobileForm.AbstractFormDelegate { + MobileForm.FormTextDelegate { id: fontSize - background: Item {} + text: i18n("Font size") - contentItem: RowLayout { - Controls.Label { - Layout.fillWidth: true - text: i18n("Font size") - } + trailing: Controls.SpinBox { + id: articleFontSizeSpinBox - Controls.SpinBox { - id: articleFontSizeSpinBox + enabled: !useSystemFontCheckBox.checked + value: SettingsManager.articleFontSize + Kirigami.FormData.label: i18n("Font size:") + from: 6 + to: 20 - enabled: !useSystemFontCheckBox.checked - value: SettingsManager.articleFontSize - Kirigami.FormData.label: i18n("Font size:") - from: 6 - to: 20 - - onValueModified: SettingsManager.articleFontSize = value - } + onValueModified: SettingsManager.articleFontSize = value } } @@ -268,19 +258,12 @@ Kirigami.ScrollablePage { title: i18n("Errors") } - MobileForm.AbstractFormDelegate { - background: Item {} - contentItem: RowLayout { - Controls.Label { - Layout.fillWidth: true - text: i18n("Error log") - } - - Controls.Button { - icon.name: "error" - text: i18n("Open Log") - onClicked: settingsErrorOverlay.open() - } + MobileForm.FormTextDelegate { + text: i18n("Error log") + trailing: Controls.Button { + icon.name: "error" + text: i18n("Open Log") + onClicked: settingsErrorOverlay.open() } } diff --git a/src/qml/Settings/StorageSettingsPage.qml b/src/qml/Settings/StorageSettingsPage.qml index 74455cc4..e724efb1 100644 --- a/src/qml/Settings/StorageSettingsPage.qml +++ b/src/qml/Settings/StorageSettingsPage.qml @@ -41,43 +41,27 @@ Kirigami.ScrollablePage { title: i18n("Storage path") } - MobileForm.AbstractFormDelegate { + MobileForm.FormTextDelegate { id: storagePath visible: Qt.platform.os !== "android" // not functional on android - background: Item {} + text: i18n("Storage path") + description: StorageManager.storagePath - contentItem: RowLayout { - spacing: 0 - ColumnLayout { - spacing: Kirigami.Units.smallSpacing - Controls.Label { - Layout.fillWidth: true - elide: Text.ElideRight - text: i18n("Storage path") - } - Controls.Label { - Layout.fillWidth: true - elide: Text.ElideRight - color: Kirigami.Theme.disabledTextColor - text: StorageManager.storagePath - } - } + trailing: Controls.Button { + Layout.leftMargin: Kirigami.Units.largeSpacing + icon.name: "document-open-folder" + text: i18n("Select folder...") + enabled: !defaultStoragePath.checked + onClicked: storagePathDialog.open() + } - Controls.Button { - Layout.leftMargin: Kirigami.Units.largeSpacing - icon.name: "document-open-folder" - text: i18n("Select folder...") - enabled: !defaultStoragePath.checked - onClicked: storagePathDialog.open() - } - FileDialog { - id: storagePathDialog - title: i18n("Select Storage Path") - selectFolder: true - folder: "file://" + StorageManager.storagePath - onAccepted: { - StorageManager.setStoragePath(fileUrl); - } + FileDialog { + id: storagePathDialog + title: i18n("Select Storage Path") + selectFolder: true + folder: "file://" + StorageManager.storagePath + onAccepted: { + StorageManager.setStoragePath(fileUrl); } } } @@ -116,30 +100,14 @@ Kirigami.ScrollablePage { MobileForm.FormDelegateSeparator {} - MobileForm.AbstractFormDelegate { - background: Item {} - contentItem: RowLayout { - spacing: Kirigami.Units.largeSpacing - ColumnLayout { - spacing: Kirigami.Units.smallSpacing - Controls.Label { - Layout.fillWidth: true - elide: Text.ElideRight - text: i18n("Image cache") - } - Controls.Label { - Layout.fillWidth: true - elide: Text.ElideRight - color: Kirigami.Theme.disabledTextColor - text: i18nc("Using of disk space", "Using %1 of disk space", StorageManager.formattedImageDirSize) - } - } + MobileForm.FormTextDelegate { + text: i18n("Image cache") + description: i18nc("Using of disk space", "Using %1 of disk space", StorageManager.formattedImageDirSize) - Controls.Button { - icon.name: "edit-clear-all" - text: i18n("Clear Cache") - onClicked: StorageManager.clearImageCache(); - } + trailing: Controls.Button { + icon.name: "edit-clear-all" + text: i18n("Clear Cache") + onClicked: StorageManager.clearImageCache(); } } }