From 0657b5fa78e3fce7a81aea79e1e588f19ef7c7f9 Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Thu, 27 Feb 2025 16:40:02 +0000 Subject: [PATCH] statusbar: fix offset for selectionModeBottomBar If selectionMode was running, statusbar would get hidden behind the selectionmode bottom bar. Instead of calculating offsets, just check for the view geometry bottom position and use that for the statusbar yPos. --- src/dolphinviewcontainer.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 99b7a4042..40df2bc7d 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -1111,17 +1111,10 @@ bool DolphinViewContainer::eventFilter(QObject *object, QEvent *event) QRect DolphinViewContainer::preferredSmallStatusBarGeometry() { - // Add offset depending if horizontal scrollbar or filterbar is visible. - int filterBarHeightOffset = 0; - int scrollbarHeightOffset = m_view->horizontalScrollBarHeight(); - - if (m_filterBar->isVisible()) { - filterBarHeightOffset = m_filterBar->height(); - } - // Adjust to clipping, we need to add 1 due to how QRects coordinates work. int clipAdjustment = m_statusBar->clippingAmount() + 1; - const int yPos = rect().bottom() - m_statusBar->minimumHeight() - scrollbarHeightOffset - filterBarHeightOffset + clipAdjustment; + // Add offset depending if horizontal scrollbar or filterbar is visible. + const int yPos = m_view->geometry().bottom() - m_view->horizontalScrollBarHeight() - m_statusBar->minimumHeight() + clipAdjustment; QRect statusBarRect = rect().adjusted(-clipAdjustment, yPos, 0, 0); return statusBarRect; } -- 2.47.3