Don't use baseview system scaling on Windows/Linux
Until the UI frameworks make it possible to get the size or scale for the window, this would cause the window contents to be scaled incorrectly if the host does not set a scale factor.
This commit is contained in:
parent
b3d2b79284
commit
ae31e416c2
|
@ -44,7 +44,13 @@ where
|
|||
user_state: Arc::new(RwLock::new(user_state)),
|
||||
update: Arc::new(update),
|
||||
|
||||
// TODO: We can't get the size of the window when baseview does its own scaling, so if the
|
||||
// host does not set a scale factor on Windows or Linux we should just use a factor of
|
||||
// 1. That may make the GUI tiny but it also prevents it from getting cut off.
|
||||
#[cfg(target_os = "macos")]
|
||||
scaling_factor: AtomicCell::new(None),
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
scaling_factor: AtomicCell::new(Some(1.0)),
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,13 @@ pub fn create_iced_editor<E: IcedEditor>(
|
|||
iced_state,
|
||||
initialization_flags,
|
||||
|
||||
// TODO: We can't get the size of the window when baseview does its own scaling, so if the
|
||||
// host does not set a scale factor on Windows or Linux we should just use a factor of
|
||||
// 1. That may make the GUI tiny but it also prevents it from getting cut off.
|
||||
#[cfg(target_os = "macos")]
|
||||
scaling_factor: AtomicCell::new(None),
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
scaling_factor: AtomicCell::new(Some(1.0)),
|
||||
|
||||
parameter_updates_sender,
|
||||
parameter_updates_receiver: Arc::new(parameter_updates_receiver),
|
||||
|
|
|
@ -34,7 +34,13 @@ where
|
|||
app: Arc::new(app),
|
||||
apply_theming: true,
|
||||
|
||||
// TODO: We can't get the size of the window when baseview does its own scaling, so if the
|
||||
// host does not set a scale factor on Windows or Linux we should just use a factor of
|
||||
// 1. That may make the GUI tiny but it also prevents it from getting cut off.
|
||||
#[cfg(target_os = "macos")]
|
||||
scaling_factor: AtomicCell::new(None),
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
scaling_factor: AtomicCell::new(Some(1.0)),
|
||||
}))
|
||||
}
|
||||
|
||||
|
@ -54,7 +60,10 @@ where
|
|||
app: Arc::new(app),
|
||||
apply_theming: false,
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
scaling_factor: AtomicCell::new(None),
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
scaling_factor: AtomicCell::new(Some(1.0)),
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue