:white_check_mark: [RESOLVED] Is there any way to ...
# compose-desktop
t
[RESOLVED] Is there any way to set min window size?
cc @olonho
a
you could react to the WindowEvent
onResize
and add some logic there that prevents getting lower than specific values
t
Okay. Will try that 👍
a
here is some code:
Copy code
Window(
        events = WindowEvents(
            onResize = { size ->
                windowSize.value = size
            }
        )
    ) {
        // Content
so basically instead of just taking whatever the new size is run some logic here
t
Understood. 🤝 Thanks 🙂
@Angelo Rüggeberg I tried to use
onResize
with a
windowSize
state, but it didn't work. I then tried with
AppManager.focusedWindow?.setSize
. It works. but the problem is, it resizes to the min size only when I release the mouse.
the
state
method that didn't work ⬇️
I think it's a known issue.
a
Thats unfortunate, it was just a best guess that i made 🙂