diff options
| author | Akseli Lahtinen <[email protected]> | 2025-02-27 16:40:02 +0000 |
|---|---|---|
| committer | Akseli Lahtinen <[email protected]> | 2025-02-27 16:40:02 +0000 |
| commit | 0657b5fa78e3fce7a81aea79e1e588f19ef7c7f9 (patch) | |
| tree | f0d5dfe26c743c2bf6a4b59075e12aea34148756 /src | |
| parent | 99c48acc8ea5e614e447a8f62d92c8d12e9cf58b (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinviewcontainer.cpp | 11 |
1 files 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; } |
