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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Border Radius From Frameless Window On Mac #414

Closed
Subash opened this issue Jun 20, 2014 · 19 comments · Fixed by #27572
Closed

Remove Border Radius From Frameless Window On Mac #414

Subash opened this issue Jun 20, 2014 · 19 comments · Fixed by #27572

Comments

@Subash
Copy link

Subash commented Jun 20, 2014

Fameless window on mac contains border radius on both top and bottom, is there any option to remove that ?
prepros_app

@keehun
Copy link

keehun commented Jul 5, 2014

I think it looks good with the border. I've seen apps without that border and it just feels off/fake/not-native.

@Subash
Copy link
Author

Subash commented Jul 5, 2014

I am asking for an option, I also do not recommend to disable that completely.

@zcbenz
Copy link
Member

zcbenz commented Jan 1, 2015

The problem is it is actually quite hard to remove the bottom rounded corners, there is an upstream bug tracked at:
https://code.google.com/p/chromium/issues/detail?id=355412

@captbaritone
Copy link

Looking to use Electron to build an OSx version of https://github.com/captbaritone/winamp2-js, but I would need to be able to turn off rounded corners for it to look good.

Seems like it might not be a solvable problem, but I wanted to add another example where non-rounded corners might be useful.

@andrewrobinson5
Copy link

I'm actually having the exact opposite problem. I would like the corners to round on windows and linux. Can anybody help me out?

@mikaa123
Copy link

mikaa123 commented Dec 6, 2015

A hack that I used to remove the rounded border was to make the window transparent, then use a css clip-path property.

@kevcjones-archived
Copy link

A bit of a bump but wondering if anyone found a non-hack way of doing this?

@gabrielstuff
Copy link

@mikaa123 how do you handle the click through the transparent window ? A real life example of border radius issue is when you want to display content on a video projector or a LED screen or any other projector.
Real life example, you want a frameless window in 500x500 and you have 10 of them.
You think you will simply start a script to place each window side by side and let the app start.
Well, no you can't, you are forced to put all of your app in one application and manage your tiled window inside one app. This sucks : /

@mikaa123
Copy link

@gabrielstuff I don't it's possible to let a click go through a window, even if it's transparent

@ivmelo
Copy link

ivmelo commented Jan 26, 2017

Is there a way to remove only the top rounded corners? I am building a tray app and it kinda looks off with the top rounded corners.
screen shot 2017-01-26 at 6 28 04 pm

@brockb
Copy link

brockb commented Jan 28, 2017

I really need square corners as well. I'm doing screen capture of a video in a chromeless window, let's say placed at X=0, Y=0, and the screen capture is picking up those rounded corners. I need to be able to capture every pixel of the video (including the missing pixels in the corners). There has to be a way to make it where border radius can be set. I really need a radius of zero.

@MondoGao
Copy link

Leave the corners away!
You can get a radius-less window-like window by:

  win = new BrowserWindow({
    frame: false, 
    transparent: true,
  });
html {
  width:  /* less then window's size */;
  height: /* the same */;
  background: /* some color here */;
}

It's a little hack though. But it works well~

@natew
Copy link
Contributor

natew commented Apr 24, 2018

@MondoGao this hack doesn't work if you're doing a full-screen app or one that docks to the side of the screen.

Here's a quick example:

image

Seems impossible to remove the border there, though the design would look much better without it. You can't indent it there because you want it to be flush with the sides.

@codebytere
Copy link
Member

Given that there exist workarounds, this is something that isn't on our current roadmap and which I am thus goin to tag as wontfix.

@andrienko
Copy link

Sadly, these "workarkounds" do not work for me on High Sierra. Kinda shame.

@gcxfd
Copy link

gcxfd commented Aug 24, 2020

image

i do it

frame: false # 无边框
minimizable: false
maximizable: false
closable:false
titleBarStyle: 'customButtonsOnHover' # 让mac不是圆角边框

@zcbenz zcbenz self-assigned this Dec 12, 2020
@zcbenz
Copy link
Member

zcbenz commented Dec 12, 2020

I'm reopening this issue since there is an easy way to do that on newer versions of macOS.

@zcbenz zcbenz reopened this Dec 12, 2020
@greggsdavis
Copy link

@zcbenz What is the easier way to remove rounded corners in newer versions of macOS?

@zcbenz
Copy link
Member

zcbenz commented Jan 5, 2021

Applying NSFullSizeContentViewWindowMask style on the window can remove the rounded corners, and I'm adding a new option for it.

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

Successfully merging a pull request may close this issue.