Issues

Issue #735 resolved

setMode surprises

hahawoo
created an issue

1: I was surprised when trying to set a window size which was less than 100 pixels wide/high, before I remembered about the minwidth/height flags.

I propose that minwidth/height have a default of 0. It's cool that those settings exist for resizable windows, but 100 is arbitrary; if you want to make use of minwidth/height, I would think that you would want to set your own values, and if you don't want to make use of it then it could surprise you.

2: I'm not sure why this happens, I was expecting a 1px by 1px window, which is possible in 0.8.0:

love.window.setMode(1, 1, {minwidth = 0, minheight = 0})
width, height, flags = love.window.getMode()
print(flags.minwidth) -- 0
print(flags.minheight) -- 0
print(width) -- 104
print(height) -- 2

Comments (2)

  1. Alex Szpakowski

    I propose that minwidth/height have a default of 0. It's cool that those settings exist for resizable windows, but 100 is arbitrary; if you want to make use of minwidth/height, I would think that you would want to set your own values, and if you don't want to make use of it then it could surprise you.

    The minimum width and height are technically system/OS-dependent - on OS X the width of any window can never go below 60-70px or so. A consistent but arbitrary value is better than an inconsistent and arbitrary one.

  2. Log in to comment