From 6b9e6eb06985b15c73b33164997e0ccd6c721df3 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 6 Jul 2021 10:33:08 +0200 Subject: [PATCH] Port Ical dir resources dialog to QFormLayout --- .../icaldir/icaldirsagentsettingswidget.ui | 169 ++++++++---------- resources/icaldir/icaldirsettingswidget.cpp | 4 + 2 files changed, 78 insertions(+), 95 deletions(-) diff --git a/resources/icaldir/icaldirsagentsettingswidget.ui b/resources/icaldir/icaldirsagentsettingswidget.ui index 7d9713c78..d7bf5f3fc 100644 --- a/resources/icaldir/icaldirsagentsettingswidget.ui +++ b/resources/icaldir/icaldirsagentsettingswidget.ui @@ -32,67 +32,60 @@ Directory - - - - - Directory Name - - - - - - - - Di&rectory: - - - kcfg_Path - - - - - - - - - - - - Select the directory whose contents should be represented by this resource. If the directory does not exist, it will be created. - - - true - - - - + + + + + Di&rectory: + + + kcfg_Path + - - - - Access Rights - - - - - - Read only - - - - - - - If read-only mode is enabled, no changes will be written to the directory selected above. Read-only mode will be automatically enabled if you do not have write access to the directory. - - - true - - - - + + + + + + + + 0 + 0 + + + + Select the directory whose contents should be represented by this resource. If the directory does not exist, it will be created. + + + true + + + + + + + Read only + + + + + + + + 0 + 0 + + + + true + + + If read-only mode is enabled, no changes will be written to the directory selected above. Read-only mode will be automatically enabled if you do not have write access to the directory. + + + true + @@ -114,9 +107,9 @@ Tuning - - - + + + The options on this page allow you to change parameters that balance data safety and consistency against performance. In general you should be careful with changing anything here, the defaults are good enough in most cases. @@ -125,39 +118,25 @@ - - - - - - Autosave delay: - - - - - - - 0 - - - 1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + Autosave delay: + + + kcfg_Path + + + + + + + 0 + + + 1 + + diff --git a/resources/icaldir/icaldirsettingswidget.cpp b/resources/icaldir/icaldirsettingswidget.cpp index d58bfe41f..71f2b1315 100644 --- a/resources/icaldir/icaldirsettingswidget.cpp +++ b/resources/icaldir/icaldirsettingswidget.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -34,6 +35,9 @@ IcalDirSettingsWidget::IcalDirSettingsWidget(const KSharedConfigPtr &config, QWi ui.kcfg_Path->setUrl(QUrl::fromLocalFile(IcalDirResourceSettings::self()->path())); ui.kcfg_AutosaveInterval->setSuffix(ki18np(" minute", " minutes")); mManager = new KConfigDialogManager(mainWidget, IcalDirResourceSettings::self()); + ui.readOnlyLabel->setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)); + ui.runingLabel->setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)); + ui.pathLabel->setFont(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont)); } void IcalDirSettingsWidget::validate() -- GitLab