Add get_scale_factor task to window module
This commit is contained in:
parent
043f030214
commit
0dcec519be
3 changed files with 22 additions and 1 deletions
|
|
@ -1291,7 +1291,7 @@ fn run_action<P, C>(
|
|||
}
|
||||
}
|
||||
window::Action::GetPosition(id, channel) => {
|
||||
if let Some(window) = window_manager.get_mut(id) {
|
||||
if let Some(window) = window_manager.get(id) {
|
||||
let position = window
|
||||
.raw
|
||||
.inner_position()
|
||||
|
|
@ -1306,6 +1306,13 @@ fn run_action<P, C>(
|
|||
let _ = channel.send(position);
|
||||
}
|
||||
}
|
||||
window::Action::GetScaleFactor(id, channel) => {
|
||||
if let Some(window) = window_manager.get_mut(id) {
|
||||
let scale_factor = window.raw.scale_factor();
|
||||
|
||||
let _ = channel.send(scale_factor as f32);
|
||||
}
|
||||
}
|
||||
window::Action::Move(id, position) => {
|
||||
if let Some(window) = window_manager.get_mut(id) {
|
||||
window.raw.set_outer_position(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue