mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Set default scale based on dpi
This commit is contained in:
parent
6d89e67194
commit
c036f1721b
1 changed files with 4 additions and 1 deletions
|
@ -126,6 +126,9 @@ impl IOCompositor {
|
||||||
let root_layer = Rc::new(ContainerLayer());
|
let root_layer = Rc::new(ContainerLayer());
|
||||||
let window_size = window.size();
|
let window_size = window.size();
|
||||||
|
|
||||||
|
let hidpi_factor = window.hidpi_factor();
|
||||||
|
root_layer.common.borrow_mut().set_transform(identity().scale(hidpi_factor, hidpi_factor, 1f32));
|
||||||
|
|
||||||
IOCompositor {
|
IOCompositor {
|
||||||
window: window,
|
window: window,
|
||||||
port: port,
|
port: port,
|
||||||
|
@ -140,7 +143,7 @@ impl IOCompositor {
|
||||||
shutting_down: false,
|
shutting_down: false,
|
||||||
done: false,
|
done: false,
|
||||||
recomposite: false,
|
recomposite: false,
|
||||||
world_zoom: 1f32,
|
world_zoom: hidpi_factor,
|
||||||
zoom_action: false,
|
zoom_action: false,
|
||||||
zoom_time: 0f64,
|
zoom_time: 0f64,
|
||||||
ready_state: Blank,
|
ready_state: Blank,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue