From a27443d904bc220615f2c4e8df74187b0c806d8a Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Mon, 24 Feb 2025 18:39:22 +0000 Subject: Add smaller statusbar and set it as default - Statusbar has three modes: Small, FullWidth and Disabled - FullWidth is the original statusbar - Small is the new default statusbar - This statusbar overlays on top of the items instead of taking space - It changes size according to content - Disabled turns statusbar completely off - Zoom slider and space information is only shown in full-width statusbar - Space information is now always on - If user navigates with keyboard, or scrolls to selection, the scrolling will take the statusbar into account - This makes sure the statusbar does not cover any items Related discussion: https://invent.kde.org/system/dolphin/-/issues/50 --- ..._25.04_update_statusandlocationbarssettings.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp (limited to 'src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp') diff --git a/src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp b/src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp new file mode 100644 index 000000000..2188fcb82 --- /dev/null +++ b/src/settings/dolphin_25.04_update_statusandlocationbarssettings.cpp @@ -0,0 +1,28 @@ +/* + SPDX-FileCopyrightText: 2025 Akseli Lahtinen + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include +#include + +int main() +{ + const auto showStatusBar = QStringLiteral("ShowStatusBar"); + auto config = KSharedConfig::openConfig(QStringLiteral("dolphinrc")); + + KConfigGroup general = config->group(QStringLiteral("General")); + if (!general.hasKey(showStatusBar)) { + return EXIT_SUCCESS; + } + + const auto value = general.readEntry(showStatusBar); + if (value == QStringLiteral("true")) { + general.writeEntry(showStatusBar, QStringLiteral("Small")); + } else if (value == QStringLiteral("false")) { + general.writeEntry(showStatusBar, QStringLiteral("Disabled")); + } + + return general.sync() ? EXIT_SUCCESS : EXIT_FAILURE; +} -- cgit v1.3