-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop: Resolves #1752: New: Option to automatically hide the menu bar #9603
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
packages/lib/models/Setting.ts
Outdated
value: false, | ||
type: SettingItemType.Bool, | ||
section: 'application', | ||
public: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to hide this setting on MacOS (as the documentation marks that method as Windows and Linux only).
To see how this is done, we do something similar for the autoUpdate
setting on Linux:
joplin/packages/lib/models/Setting.ts
Line 1384 in f8a25cb
autoUpdateEnabled: { value: true, type: SettingItemType.Bool, storage: SettingStorage.File, isGlobal: true, section: 'application', public: platform !== 'linux', appTypes: [AppType.Desktop], label: () => _('Automatically check for updates') }, |
(The autoUpdate
setting probably shouldn't be hidden on Linux, so the above example may cause a bug.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thanks!
I've added a condition similar to the one on autoUpdateEnabled
, as you've mentioned.
Thank you for working on this! Be aware that we have a script that generates release notes from pull request titles. As such, I suggest changing |
Thanks for your feedback! #3894 targets a different issue/feature request, imho. Though it is related to this PR, I'd prefer to create a seperate pull request for the feature requested in that issue. I've also changed a few more bits in this PR: In addition to that, I've changed the window instantiation to hide the menu bar by default on startup. This is to prevent the menu bar from being visible for a short amount of time when the window loads before it get's hidden again. If hiding is disabled, it will be shown together with when the app gets rendered. |
@tinyoverflow, thank you for the pull request but as mentioned above it would be better if it's a menu item. Making it a menu item appears to be more in line with other commonly used applications, and it also makes it possible to associate a keyboard shortcut with the action. Please let us know if you need any assistance to complete the pull request. |
Closing for now but feel free to let us know if you'd like to give it another try. Sorry we couldn't merge the PR as it is. |
@laurent22 Thanks. I unfortunately do not have that much time available at the moment. I'll give it another shot at the weekend :) |
Hi @tinyoverflow, I've implemented @laurent22's suggestion of making this a menu item, making my changes off of your fork+branch. Would you like me to create a PR on your fork, or should I make a new PR in this repo? |
Hello @LightTreasure, unfortunately I couldn't find any time digging deeper into this. Thanks for taking this! |
@tinyoverflow I'll make a PR on you repo! I built on top of your work :) |
@tinyoverflow Here's the PR: tinyoverflow#1 |
This PR adds an option to automatically hide the menu bar on desktop. It can still be shown with the alt key. There were two other related posts to this:
I noticed on caveat: When toggling the menu bar, the webview or it's content doesn't resize automatically. This can be fixed by resizing the window, though. I have absolutely no experience with Electron and therefore couldn't solve this. Any help regarding this issue is appreciated.