Fix issues where screen and window sizes contained Pixels, but were declared as DevicePixels (#12991)
On most platforms, things were working correctly, but had the wrong type. On X11, there were some problems with window and display size calculations. Release Notes: - Fixed issues with window positioning on X11 --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
22dc88ed3d
commit
da281d6d8f
25 changed files with 331 additions and 367 deletions
|
@ -3,8 +3,8 @@
|
|||
|
||||
use super::{BladeAtlas, PATH_TEXTURE_FORMAT};
|
||||
use crate::{
|
||||
AtlasTextureKind, AtlasTile, Bounds, ContentMask, Hsla, MonochromeSprite, Path, PathId,
|
||||
PathVertex, PolychromeSprite, PrimitiveBatch, Quad, ScaledPixels, Scene, Shadow, Size,
|
||||
AtlasTextureKind, AtlasTile, Bounds, ContentMask, DevicePixels, Hsla, MonochromeSprite, Path,
|
||||
PathId, PathVertex, PolychromeSprite, PrimitiveBatch, Quad, ScaledPixels, Scene, Shadow, Size,
|
||||
Underline,
|
||||
};
|
||||
use bytemuck::{Pod, Zeroable};
|
||||
|
@ -417,10 +417,10 @@ impl BladeRenderer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn update_drawable_size(&mut self, size: Size<f64>) {
|
||||
pub fn update_drawable_size(&mut self, size: Size<DevicePixels>) {
|
||||
let gpu_size = gpu::Extent {
|
||||
width: size.width as u32,
|
||||
height: size.height as u32,
|
||||
width: size.width.0 as u32,
|
||||
height: size.height.0 as u32,
|
||||
depth: 1,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue