Bug 318401 - Visibility of panels (dock widgets) should be togglable by single action
Summary: Visibility of panels (dock widgets) should be togglable by single action
Status: REOPENED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: 1.7 (KDE 4.12)
Assignee: marble-bugs
URL: https://git.reviewboard.kde.org/r/110152
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2013-04-15 18:09 UTC by Bernhard Beschow
Modified: 2016-11-05 09:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Text file containing "git diff" content (20.20 KB, text/plain)
2013-04-23 17:02 UTC, Shiv Shankar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2013-04-15 18:09:31 UTC
The visibility of the old sidebar could be toggled by <<F9>> or by clicking the respective action in the settings menu. This behavior should be restored to allow users to easily take advantage of the whole screen width.

Reproducible: Always




In addition, the visible dock widgets should be remembered. So when showing the dock widgets again, the same set of dock widgets should become visible as was when they were hidden.
Comment 1 Dennis Nienhüser 2013-04-16 06:48:54 UTC
A possible implementation could do:
- Add a new action to the panels menu, "Show &Panels", shortcut F9, checkable
- Add a separator below
- When checked, restore panel state and enable all individual panel (dock widget) toggle actions
- When unchecked, save panel state, hide all panels
- Save/restore its own state on closing/opening Marble
Comment 2 Bernhard Beschow 2013-04-16 11:09:44 UTC
I think that the exsisting menu entry "Settings->Panels" could be reused by making it togglable.
Comment 3 Dennis Nienhüser 2013-04-16 11:26:45 UTC
Such a double use of a menu item (sub-menu and checkable) sounds wrong to me from a usability perspective.
Comment 4 Bernhard Beschow 2013-04-16 16:49:49 UTC
It would allow toggling all panels on/off with one fewer mouse click, which sounds like better usability to me.
Comment 5 Dennis Nienhüser 2013-04-16 18:06:20 UTC
Sub menus open without mouse clicks, so it's the same number of clicks.

Imagine someone who knows that sub menus open without a mouse click. He'll never try to click on that item.

Imagine someone who does not know that sub menus open without a mouse click. He clicks on the "Panels" entry to open the sub menu. It is however also a toggle action, so instead of ending up in the sub menu, the menu is closed and all dock widgets disappear.

Sub menus are QMenus btw, not actions. Technically there's no triggered() event for a menu and implementing what you'd like to have would require extending QMenu to catch that event.

Or am I maybe understanding you wrong and you'd like to have an additional action next to the sub menu, just not inside it?
Comment 6 Shiv Shankar 2013-04-23 17:02:49 UTC
Created attachment 79396 [details]
Text file containing "git diff" content

I have added features of showing and hiding the dockwidgets in both marble and marble-qt.
It works after restarting marble as well.
Also, toggling any panel when all docks hidden, is handled carefully.
Comment 7 Dennis Nienhüser 2013-10-20 14:54:17 UTC
There's a patch at https://git.reviewboard.kde.org/r/110152
It needs some more work to match code style guidelines and be less redundant.
Comment 8 Dennis Nienhüser 2013-12-06 21:07:24 UTC
Git commit 5fe3eef63d5aad409aa60ef98de1bf99804094ed by Dennis Nienhüser, on behalf of Daniel Lanzi.
Committed on 06/12/2013 at 21:01.
Pushed by nienhueser into branch 'master'.

Menu option and shortcut to toggle visibility of all panels at once

GCI task #5212661281193984

M  +67   -2    src/apps/marble-ui/ControlView.cpp
M  +9    -0    src/apps/marble-ui/ControlView.h

http://commits.kde.org/marble/5fe3eef63d5aad409aa60ef98de1bf99804094ed
Comment 9 Bernhard Beschow 2013-12-13 20:09:55 UTC
If the panels are hidden when Marble shuts down, the panels aren't restored by F9 after Marble has been launched again.

Steps to reproduce:
1. Show the Routing and Map View panels
2. Hide them by pressing F9
3. Restart Marble
4. Press F9

Actual Result:
No panels appear

Expected Result:
The Routing and Map View panels should be restored