Code Monkey home page Code Monkey logo

Comments (11)

PavanKu avatar PavanKu commented on July 17, 2024 3

Hi @gschier , I am taking up this issue.

from insomnia.

PavanKu avatar PavanKu commented on July 17, 2024 2

After looking at the Electron documentation, i found that BrowerWindow has a property autoHideMenuBar which enables this behaviour.

autoHideMenuBar Boolean (optional) - Auto hide the menu bar unless the Alt key is pressed. Default is false.

https://electron.atom.io/docs/api/browser-window/#new-browserwindowoptions

Let me know, what you guys think about this option?

from insomnia.

brandonb927 avatar brandonb927 commented on July 17, 2024 1

For whoever takes this on, this PR is a good jumping-off point for work atom/atom#4215

from insomnia.

FlyteWizard avatar FlyteWizard commented on July 17, 2024

Question:

  1. Is this setting going to be found in the preferences section or the view tab?
  2. Would you like a keybinding for this improvement as well?

from insomnia.

gschier avatar gschier commented on July 17, 2024

Nice find @brandonb927! 💯 🥇

from insomnia.

gschier avatar gschier commented on July 17, 2024

Electron has a setMenu method that looks like it might work to hide the window: https://electron.atom.io/docs/api/browser-window/#winsetmenumenu-linux-windows.

Could add a menu item on Win/Linux to toggle it on the active window. Just have to figure out which hotkey to use.

from insomnia.

 avatar commented on July 17, 2024

Hi everyone! I'm handling issue #195, and its solution will affect this issue. I'll keep you guys posted.

from insomnia.

gschier avatar gschier commented on July 17, 2024

@PavanKu that looks like exactly what we want. Did you test it out yet?

from insomnia.

PavanKu avatar PavanKu commented on July 17, 2024

@gschier , No. I don't have window or linux machine to test this. 😞

from insomnia.

Subzidion avatar Subzidion commented on July 17, 2024

I took a look at it, I was able to add a checkbox in the settings for toggling auto-hide Menu Bar, but I wasn't sure where to tell Electron to hide/show the bar (looks like there's a BrowserWindow function to set it). I'm on Linux if you have a solution and need me to test it, otherwise I'll keep looking at it tomorrow.

from insomnia.

gschier avatar gschier commented on July 17, 2024

@Subzidion. Nice!

You can get the current BrowserWindow with electron.remote.BrowserWindow.getFocusedWindow(), then set the option. We'll have to make sure to do this both when the app is first rendered and when the setting changes. It might be a good place to put this in containers/app.js in componentDidMount().

It might also be a good idea to add autoHideMenuBar: true to window-utils.js to prevent the menubar from showing briefly before disappearing.

from insomnia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.