diff options
| author | Akseli Lahtinen <[email protected]> | 2025-02-24 18:39:22 +0000 |
|---|---|---|
| committer | Akseli Lahtinen <[email protected]> | 2025-02-24 18:39:22 +0000 |
| commit | a27443d904bc220615f2c4e8df74187b0c806d8a (patch) | |
| tree | 420ff120b30bb2492a363abf9ddf80a8697d3ad9 /src/kitemviews/kitemlistview.h | |
| parent | 69c4792928edef91b5aea06772d02eb0f7c873b4 (diff) | |
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
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
| -rw-r--r-- | src/kitemviews/kitemlistview.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 30ce4d871..7fb3344b4 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -302,6 +302,12 @@ public: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override; + /** + * Set the bottom offset for moving the view so that the small overlayed statusbar + * won't cover any items by accident. + */ + void setStatusBarOffset(int offset); + Q_SIGNALS: void scrollOrientationChanged(Qt::Orientation current, Qt::Orientation previous); void scrollOffsetChanged(qreal current, qreal previous); @@ -776,6 +782,8 @@ private: QPropertyAnimation *m_indicatorAnimation; + int m_statusBarOffset; + // When dragging items into the view where the sort-role of the model // is empty, a visual indicator should be shown during dragging where // the dropping will happen. This indicator is specified by an index |
