Repository navigation
Suggested menu toggle fix. Solves #41070 #35010 #37724 - #46181
Lyall Hamilton (lyallh) wants to merge 2 commits into
Conversation
|
Lyall Hamilton (@lyallh) I am not a big fan of changing the semantics of this command in such a subtle way. How about introducing 2 new actions/commands "Show Menu" and "Hide Menu" that set the corresponding configuration value to |
|
No worries. I can see your point. Like you said, the issue is really an upstream limitation in electron (can't remap Alt-key for autoHideMenubar) so this is a workaround. Separate show and hide commands is slightly less convenient but could also satisfy the complaints. But bear in mind it does not address the underlying incongruence/dichotomy in the current toggling implementation that will continue to cause confusion/minor frustration for anyone attempting to change the toggle menu bar key. My alternate suggestion would be to make Toggle Menu Bar respect the user's visibility setting better. Toggling from the 'hidden' visibility state will toggle between 'hidden'/'default'. Toggling from 'toggle' will toggle between 'toggle'/'default' (default/current behaviour). Have pushed a quickfix implementation of this as example. |
17e8c75 to
c2d85bb
Compare
|
Lyall Hamilton (@lyallh) yeah that sounds like a good approach too |
|
Yeah semantically I'd expect a "toggle" to switch to some new state and then back to to the original. Not happening currently when Toggle Menu Bar goes hidden -> default -> toggle. I have to go back into settings to restore my 'hidden' setting. |
|
Lyall Hamilton (@lyallh) I don't think your fix works, there is many more ways how this setting could have changed (e.g. by the user editing settings) and it would also not survive a restart. |
|
Benjamin Pasero (@bpasero) Yeah it won't survive a restart if a user closes with the menubar visible. But for the case we are talking about, in which a user has the menu normally on hidden and wants to occasionally toggle it visible with Toggle Menu Bar it works (as long as they close program with the menubar hidden - it will open on hidden and the hidden state will be captured on first toggle) It's a quick fix and starting point while exploring how to solve this. I could attempt to implement a more robust/persistent solution some day but won't unless you approve of the approach. Perhaps lets let this lie / close until someone comments on the issue again and wants a fix. |
|
The fundamental problem here is a conflation of temporary vs persistent state. It would make more sense to treat |
|
Justin Warkentin (@jwarkentin) that's a good point. Think I agree it would be better if the toggle command operated on a temporary variable that is controlling the menubar visibility for the session. Rather than controlling visbility directly from the settings value. If someone wants to make a permanenet change to visibility they should have to go into settings. I could implement this is you agree Benjamin Pasero (@bpasero). But maybe there are other things relying on the menuBarVisibility setting to reflect the actual state. Complicating things. |
This is a fix I described in this comment