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

Ability to create a borderless window #231

Closed
soluty opened this issue Apr 19, 2019 · 10 comments
Closed

Ability to create a borderless window #231

soluty opened this issue Apr 19, 2019 · 10 comments
Labels
enhancement New feature or request

Comments

@soluty
Copy link

soluty commented Apr 19, 2019

the NewWindow api cant create no titlebar window, if i want to do this, i must change sourcecode and add code like this in function glDriver.CreateWindow, it is not a good choice, but i cant find any windowSetting can solve this.
some awesome tool like alfred have no window titlebar

glfw.WindowHint(glfw.Resizable, 0)
glfw.WindowHint(glfw.Decorated, 0)
@andydotxyz
Copy link
Member

You are right this is not currently possible. A simple “borderless window” may be due to many different types of windows - such as a splash screen or an overlay etc. What type of window were you trying to create so we can add the appropriate api?

Many other toolkits provide certain functionality to match intent rather than fine control like turning off borders. I’d just like to try and match the api simplicity as we have done in other areas.

@andydotxyz
Copy link
Member

Probably relates to #204

@soluty
Copy link
Author

soluty commented Apr 21, 2019

thanks, currently i try to make a simple tool like alfred in macos. becouse now i use windows in company and macbook in home, and i cant find a cross platform tool like alfred can save my time. cerebron is a cross platform tool, it made by electron but need too much memory. so i tryed to make similar one written by go, fyne is a crossplatform ui lib i choose ,and robotgo is the crossplatform systemmanager i choose。
by the way, shoold window interface need a function named Toggle() or Visibily(), currently i must hold the visible state in my code and i think this is not a good idea.

@andydotxyz
Copy link
Member

Thanks. Your question about Toggle() (or, I prefer Visible()) is a good one - but I don't know that toggling window visibility is a common enough case to add it to the main API. Usually you set a window to be visible until it is no longer needed when it's hidden. Then some user action shows it again.

Can you explain why toggling is needed for your flow?

@soluty
Copy link
Author

soluty commented Apr 24, 2019

for a laucher app, the ability to quick hide and show is need. and they are invoke by same keycode. so need know the window current visible state

@andydotxyz
Copy link
Member

But it will not be a Fyne window that is listening for the keyboard to show the window will it? The combination will be tied to your desktop configuration or something? Once the Fyne window is visible it can then make itself hidden, but once gone it cannot reappear from the keyboard combination.
Or am I missing something? What will launch the window?

@andydotxyz andydotxyz changed the title How to create no titlebar window? Ability to create a borderless window Apr 30, 2019
@andydotxyz
Copy link
Member

I have changed the title to be a feature request for the borderless window. We will probably need to expose this somehow as a desktop extension. I can't yet decide if we should do it by class (splash, dialog etc) or if we should expose the "raw" API to turn this off. Will think some more.

I haven't heard from the question about toggling windows so will not follow up on the Window.Toggle() request as I don't think it fits the model.

@andydotxyz andydotxyz added the enhancement New feature or request label Apr 30, 2019
@andydotxyz
Copy link
Member

This is probably needed for #395 as well - we will need to have a canvas shown without window borders.

@sanguohot
Copy link

Need this feature and transparent backgroud.

andydotxyz added a commit that referenced this issue Jan 28, 2020
This sets up a borderless, centered window and possible related hints.
Fixes #231
andydotxyz added a commit that referenced this issue Jan 29, 2020
This sets up a borderless, centered window and possible related hints.
Fixes #231
@andydotxyz
Copy link
Member

This is available on develop branch for testing, it will be in release 1.3

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

No branches or pull requests

3 participants