Rename ScaleFactorChanged event to Rescaled

This commit is contained in:
Héctor Ramón Jiménez 2025-11-29 06:45:34 +01:00
parent 21cf7f98d7
commit 8811367e42
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 6 additions and 6 deletions

View file

@ -28,6 +28,9 @@ pub enum Event {
/// A window was resized. /// A window was resized.
Resized(Size), Resized(Size),
/// A window changed its scale factor.
Rescaled(f32),
/// A window redraw was requested. /// A window redraw was requested.
/// ///
/// The [`Instant`] contains the current time. /// The [`Instant`] contains the current time.
@ -71,7 +74,4 @@ pub enum Event {
/// ///
/// - **Wayland:** Not implemented. /// - **Wayland:** Not implemented.
FilesHoveredLeft, FilesHoveredLeft,
/// A window's scale factor was changed.
ScaleFactorChanged(f64),
} }

View file

@ -331,9 +331,9 @@ pub fn window_event(
Some(Event::Window(window::Event::Moved(Point::new(x, y)))) Some(Event::Window(window::Event::Moved(Point::new(x, y))))
} }
WindowEvent::ScaleFactorChanged { scale_factor, .. } => Some( WindowEvent::ScaleFactorChanged { scale_factor, .. } => {
Event::Window(window::Event::ScaleFactorChanged(scale_factor)), Some(Event::Window(window::Event::Rescaled(scale_factor as f32)))
), }
_ => None, _ => None,
} }
} }