]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Move settings category switcher to the top on mobile
authorFelix Ernst <felixernst@zohomail.eu>
Tue, 17 Sep 2024 09:34:30 +0000 (11:34 +0200)
committerFelix Ernst <felixernst@kde.org>
Thu, 17 Oct 2024 15:52:31 +0000 (15:52 +0000)
There is not enough horizontal space to show the full Dolphin
settings window on the average phone. This commit saves some
horizontal space by moving the category switcher in Dolphin
settings from being a list on the left to being tabs on the top.

src/settings/dolphinsettingsdialog.cpp

index 782a03ae9132494e4f32f9099565573c069f7bfb..d9184759e70a3517e7d66495dfad707e438af8b5 100644 (file)
@@ -21,6 +21,7 @@
 #include <KAuthorized>
 #include <KLocalizedString>
 #include <KMessageBox>
+#include <KRuntimePlatform>
 #include <KWindowConfig>
 
 #include <kwidgetsaddons_version.h>
@@ -37,7 +38,7 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl &url, QWidget *parent, K
     const QSize minSize = minimumSize();
     setMinimumSize(QSize(540, minSize.height()));
 
-    setFaceType(List);
+    setFaceType(KRuntimePlatform::runtimePlatform().contains(QLatin1String("phone")) ? Tabbed : List);
     setWindowTitle(i18nc("@title:window", "Configure"));
 
     // Interface