does minViewHeight work on macOS?

Hi…Solar2d 2022.3680, macOS Mojave.

My build.settings has ‘resizable=true’, and ‘minViewHeight=140’.
(config.lua has ‘scale=false’)

But…the app/macOS is allowing me to resize the window to less than 140 pixels (down to about 118 pixels).

The app/macOS does honor the value of minViewWidth!

Is this a known bug?

thanks!

settings = {
   window = {           -- for macOS
      resizable = true,
      showWindowTitle = true,
      minViewWidth = 200,   --    works
      minViewHeight = 140,   --   doesn't seem to work (macOS I can shrink to about 118)
   },

Without testing anything, I would wager a guess that parameter it might be affecting some different value. Maybe those “missing” 22 pixels are a part of the window via some effects, like drop shadows, and not the actual dimensions of the view port?

Did you test if the actual minimum size is always about 22 pixels smaller, or if the real minimum is set to 118, even if you set the value to 600?

1 Like

XeduR raised an interesting question … I confirmed that the app/macOS lets me reduce the window to a height that’s 22 pixels less than minViewHeight. (I tried three different values of minViewHeight.)

Now, 22 pixels more would be understandable (e.g., reserving 22 for a title bar or something), but 22 less seems unexplainable :slight_smile:

As a workaround, I’m setting minViewHeight to 22 more than I thought I needed.

My app now lets the user resize the window fairly freely, and it adapts reasonably well (not perfectly, but…(I hate to say it) “good enough” for now.

thanks!