fix: Round up the width under HIDPI (#374)
This commit is contained in:
parent
86f5bd5d86
commit
536bd32efc
2 changed files with 4 additions and 4 deletions
|
|
@ -472,8 +472,8 @@ pub(super) fn update_surface_viewport(
|
|||
let dims = &window_data.attrs.dims;
|
||||
let size_hints = &window_data.attrs.size_hints;
|
||||
|
||||
let width = (dims.width as f64 / scale_factor.0) as i32;
|
||||
let height = (dims.height as f64 / scale_factor.0) as i32;
|
||||
let width = (dims.width as f64 / scale_factor.0).ceil() as i32;
|
||||
let height = (dims.height as f64 / scale_factor.0).ceil() as i32;
|
||||
if width > 0 && height > 0 {
|
||||
viewport.set_destination(width, height);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue