alexislozano / neutrino

A GUI frontend in Rust based on web-view
MIT License
281 stars 18 forks source link

How do I create a frameless/tiltlebarless window? #80

Open Maikel1963 opened 4 years ago

Maikel1963 commented 4 years ago

As neutrino windows can have a theme which does not always match frame and titlebar (especially for MS windows) I woluld like to open a window without frame and titlebar so that everything is completly customizable (if necessary a custom titlebar could be created out of a small container with an image (app-icon), a label titlebartext) and 3 small buttons (minimize, maximize, close) - or whatever you like to have here) and even frame could follw the chosen theme. What do I have to do, to get such a window?

not-matthias commented 4 years ago

Neutrino uses web-view library behind the scenes. There's already an issue on the original web-view project, where somebody asked the same question.

It seems like you'd have to implement it yourself, by using the bindings for the specified operating system. Here's a cool project, which has the different window styles for windows.

Maikel1963 commented 4 years ago

It seems like you'd have to implement it yourself, by using the bindings for the specified operating system. Here's a cool project, which has the different window styles for windows. Thanks for your answer .-) as my projekt is intended to be used under windows and linux, I hoped for an easier solution.

simonsan commented 4 years ago
web_view::builder()
        .frameless(false)

Should do the trick, using web-view v0.6 though

simonsan commented 4 years ago

Bumped dependency versions and added window.set_frameless() ;-)

Blakeinstein commented 4 years ago

Not exactly neutrino issue, but I would like to know how, if at all, did you get around the drag issues? I added a custom title bar but am seemingly unable to drag.