Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] Set titleBarStyle to hiddenInset. It's so pretty now! 馃専 #1526

Closed
wants to merge 2 commits into from

Conversation

mdeboer
Copy link
Contributor

@mdeboer mdeboer commented May 28, 2019

Insomnia looks great but it has this default grey title bar that looks awful when using most themes. So, as I like things to look pretty, I took the liberty of making some minor modifications (see screenshot) to the title bar.

I hooked in to the full-screen events to add/remove a class from the document body as in full screen the "traffic lights" are hidden, hence the workspace title should shift back to the left.

Please let me know what you think! 馃帀

Screenshot 2019-05-28 at 00 58 10

@welcome
Copy link

welcome bot commented May 28, 2019

馃挅 Thanks for opening this pull request! 馃挅

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

Copy link

@vladanpaunovic vladanpaunovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than one small syntax request I am very happy with this going out!
LGTM.

packages/insomnia-app/app/main/window-utils.js Outdated Show resolved Hide resolved
Co-Authored-By: Vladan Paunovic <thisisvladan@gmail.com>
@mdeboer
Copy link
Contributor Author

mdeboer commented Jun 21, 2019

All done, hope it gets merged soon!

@gschier
Copy link
Contributor

gschier commented Jul 16, 2019

I'm torn on this one. I totally see why you would like this change but there are a couple things that prevent me from being on board.

  1. The main issue is that Insomnia does not have a concept of a "titlebar" with the OS-level one removed. Apps with custom titlebars usually have a similar UI element that fits the same need (showing a title, some additional info, and maybe a few actions). Insomnia does have a visual bar that runs across the top but, in my opinion, it's not a great replacement for the OS-level titlebar.

  2. Similar to no. 1, not having a titlebar means there is nothing to grab to drag the window

So, while I can see the reasons for a change like this, I don't think the pros are strong enough to outweigh the cons.


I would be much more comfortable providing a themeable replacement titlebar instead of removing the system one. This approach would benefit both Windows and Mac users too. I actually tried this a while ago but it was more work than I expected. Check out the PR for more details: #310

If someone wants to pick up where this PR left off I'd be happy to discuss or answer any questions.

@mdeboer
Copy link
Contributor Author

mdeboer commented Jul 17, 2019

Imho it only serves to minimize, maximize and close, is the title really used? However you are right, it is also for dragging but afaik that still works. If not, it is very easily implemented by making the whole top bar draggable for example.

You can make it themeable but you'll accomplish the same thing basically. Except you have to handle the buttons yourself or at the very least on Windows.

Fyi look at apps like Atom which have an option to make similar adjustments to the titlebar. Not sure they have it on Windows though. But they fully replicate a titlebar. Also check out Paw which also has a custom "titlebar" which more or less acts the same as in Insomnia.

With the addition of a draggable region, would you consider merging?

@gschier
Copy link
Contributor

gschier commented Aug 5, 2019

I still think the best way to go about it is to recreate the titlebar in a themable way, like VSCode does, re-implementing the buttons and menus from scratch so it can be completely themed to fit the app.

Paw is actually a good example of a custom titlebar done correctly in my opinion. It still operates like a stock titlebar by displaying the buttons, a title, and some extra global actions. I respectfully disagree that Paw's titlebar is similar to how Insomnia exists currently. Things in the titlebar should be global to the application. Editing a URL, as one example, is not a global action, and thus does not belong in the titlebar.

image

@gschier gschier closed this Aug 5, 2019
@wohckcin
Copy link

@rmedaer @gschier

Hey guys, just wondering if it's possible to reopen this issue. The current title bar doesn't look good in MacOS Big Sur, or at least can we have the option to enable/disable it?

Screen Shot 2021-01-29 at 10 22 39 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants