christolliday / limn

Experimental cross platform GUI library
Other
404 stars 19 forks source link

Rename window::size_* to indicate device vs layout. #14

Closed waywardmonkeys closed 6 years ago

waywardmonkeys commented 6 years ago

The size_f32 method becomes layout_size to better indicate what it is for, and the size_u32 method becomes device_size.

christolliday commented 6 years ago

Thanks for this, this code smell actually indicates some deeper problems so I don't want to merge it just yet, the real issue is there is a difference between device pixels and layout pixels, but both of these methods return device pixels, ie. with no density scaling. The solution will probably be just to use get_inner_size_points instead of get_inner_size_pixels and use your change, but I want to test it on a high dpi display and also potentially rethink naming of geometric types.

waywardmonkeys commented 6 years ago

I didn't realize the f32 version was returning the wrong data ... I did know that this is resulting in issues as I've been doing my builds on macOS and since things are always high DPI there, nothing works. :)

christolliday commented 6 years ago

ah good to know, unfortunately I won't have a high DPI display (or working macOS setup) for a little while. Could you make that change and see if it fixes anything for you? There's a small chance that's what's causing issues on macOS.

christolliday commented 6 years ago

alright looks like it's not the (only) issue on OSX, so don't worry about it, I'll make that change later