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

Customize titlebar #2384

Closed
DreamSaddle opened this issue Jul 20, 2022 · 6 comments
Closed

Customize titlebar #2384

DreamSaddle opened this issue Jul 20, 2022 · 6 comments
Labels
C - needs investigation Issue must be confirmed and researched F - question There's no such thing as a stupid one S - enhancement Wouldn't this be the coolest?

Comments

@DreamSaddle
Copy link

Hey guys!

Can I customize the title bar of the window? Like this, If so, how can I implement it?

image

@maroider
Copy link
Member

maroider commented Jul 20, 2022

We currently don't support this, and I believe it is something that is difficult to do in a cross-platform manner. This page details how you can accomplish something like this on Windows, although I suspect that implementing such a thing would interact with #1891 in some manner.

@maroider maroider added S - enhancement Wouldn't this be the coolest? F - question There's no such thing as a stupid one C - needs investigation Issue must be confirmed and researched labels Jul 20, 2022
@DreamSaddle
Copy link
Author

DreamSaddle commented Jul 20, 2022

@maroider Thinks!

Window instance of Winit has ns_window, hinstance or hwnd functions, can I use it return value in Windows-rust?

@maroider
Copy link
Member

You can indeed use those values with whatever native bindings you'd like.

@DreamSaddle
Copy link
Author

So, in this case, could I call those values through the native functions binding provided by Windows-rust to implement custom window display ?

@maroider
Copy link
Member

You can use those with windows-rs, yes, but I'm not sure if you actually can accomplish this with 0 changes to winit. Abusing window subclassing should get you some of the way there, but it's not a great solution.

@DreamSaddle
Copy link
Author

Ok, I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - needs investigation Issue must be confirmed and researched F - question There's no such thing as a stupid one S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

2 participants