]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Do not show the Zoom toggle context menu on small statusbar
authorAkseli Lahtinen <akselmo@akselmo.dev>
Wed, 26 Feb 2025 10:30:43 +0000 (12:30 +0200)
committerAkseli Lahtinen <akselmo@akselmo.dev>
Wed, 26 Feb 2025 11:43:30 +0000 (13:43 +0200)
Small statusbar should not have zoom slider enabled, but this
could be bypassed by using the context menu.

If we have small statusbar, just return early instead.

src/statusbar/dolphinstatusbar.cpp

index d9ed1076e0ce6de09ce10fe3dced02903b88502a..e9773cb696f0f1afe1bc97de5db839218baa91b4 100644 (file)
@@ -339,6 +339,11 @@ void DolphinStatusBar::contextMenuEvent(QContextMenuEvent *event)
 {
     Q_UNUSED(event)
 
+    // Do not show the context menu on small statusbar.
+    if (GeneralSettings::showStatusBar() == GeneralSettings::EnumShowStatusBar::Small) {
+        return;
+    }
+
     QMenu menu(this);
 
     QAction *showZoomSliderAction = menu.addAction(i18nc("@action:inmenu", "Show Zoom Slider"));