Is it possible to change the color, of the window ...
# compose-desktop
y
Is it possible to change the color, of the window topbar and if not is there any examples of making a custom one? I'm particularly curious if there any examples of implementing the draggable window part?
t
AFAIK, you can't directly customise the window topbar. But, you can use the
undecorated = true
flag of
Window
to hide the OS topbar, and create a
@Composable
that'd act as a toolbar. To make it draggable, you can use
WindowDraggableArea
. Here's an example
Output
f
Just be aware that you'll have to manage all the actions related to 'topbar' - minimize, maximize and close. And bear in mind that different platforms have different conventions, e.g. on Windows the controls are on the right and on macOS the controls are on the left.
1
t
@Filip Wiesner Yeah that's right. but I should say the Window API is pretty cool and really straight forward. Implementing something like that shouldn't take much time.
f
That's fair, just wanted to point that out because for someone it might not be worth implementing
👍 1
t
can't agree more.
y
Thank you @theapache64 & @Filip Wiesner for both of your inputs and I was aware of the window api and seemed simple and good anoth to surfice for a basic window topbar, as for the draggled able example, that's example what I needed, also have to say @theapache64 I have to say your stackys app, has helped me alot a quite few times in using compose desktop, just wanted to say how well the app was made and you did a very good job 🙂
t
thanks buddy, it means a lot to me 🙇