Bug 455013 - Port sidebar to QDockWidget
Summary: Port sidebar to QDockWidget
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 22.04.1
Platform: Other Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-08 08:29 UTC by popov895
Modified: 2022-12-23 19:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description popov895 2022-06-08 08:29:59 UTC
SUMMARY

The current implementation of the sidebar lacks many of the features found in the QDockWidget, namely:
- grouping;
- undocking;
- moving into new areas;
- closing with close button.

Porting the sidebar to QDockWidget would eliminate all these shortcomings and improve the UX/UI of the app.

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed 20220606
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2
Comment 1 David Hurka 2022-06-08 10:19:18 UTC
Good idea, but note that Okular is designed as KParts application.
There is an Okular shell, which has a main window, and an Okular part, which does the document view and implements the sidebar.
The part provides a widget which is placed in the tab widget of the shell.
Therefore, the part can not use QDockWidget in the straightforward way like a “normal” application could do.

Personally, I would like to see the sidebar in dock widgets.
So if you know a good solution to implement that, let us know. :)
Comment 2 Bug Janitor Service 2022-10-29 10:07:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/669
Comment 3 Albert Astals Cid 2022-12-22 22:51:00 UTC
Git commit 2fbab13e1f439f0dd2c6758d51c80e86ee49392a by Albert Astals Cid, on behalf of Eugene Popov.
Committed on 22/12/2022 at 22:50.
Pushed by aacid into branch 'master'.

Port sidebar to QDockWidget

With this MR, the sidebar can now be (if not locked):
* docked to the left or right side
* undocked and floated as an independent window
* closed with the close button in the header

M  +7    -0    interfaces/viewerinterface.h
M  +5    -0    part/part.cpp
M  +1    -0    part/part.h
M  +5    -0    part/sidebar.cpp
M  +2    -0    part/sidebar.h
M  +161  -1    shell/shell.cpp
M  +5    -1    shell/shell.h
M  +6    -1    shell/shell.rc

https://invent.kde.org/graphics/okular/commit/2fbab13e1f439f0dd2c6758d51c80e86ee49392a