Closed waywardmonkeys closed 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.
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. :)
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.
alright looks like it's not the (only) issue on OSX, so don't worry about it, I'll make that change later
The
size_f32
method becomeslayout_size
to better indicate what it is for, and thesize_u32
method becomesdevice_size
.