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
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. :)
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/669
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