Set windows' minimum size depending on Dp
The following discussion from !144 (merged) should be addressed:
-
@sebkur started a discussion: (+4 comments) I think it probably makes sense to add a minimum size to the dialog's underlying window, too. Like we do in
BriarUi#start()
, i.e. we could addwindow.minimumSize = Dimension(450, 500)
or even use the initial sizes used above (although the probably need to be converted to pixels somehow
quoting @paul-lorenc :
From https://github.com/JetBrains/compose-jb/issues/1773, it looks like we can use the following line:
val density = LocalDensity.current
To get the current screen density, then calculate the dp to pixel conversion using this density (maybe?). For now I think
window.minimumSize = Dimension(x, y)
is good enough here, and we can further investigate this method to use here, and also for defining the minimum size of the main UI window.