Windows: implement resize increments (#3623)

This commit is contained in:
tetra 2024-04-21 13:05:41 +00:00 committed by GitHub
parent be79e8979a
commit babbb715c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 121 additions and 17 deletions

View file

@ -893,7 +893,7 @@ impl Window {
///
/// ## Platform-specific
///
/// - **iOS / Android / Web / Wayland / Windows / Orbital:** Always returns [`None`].
/// - **iOS / Android / Web / Wayland / Orbital:** Always returns [`None`].
#[inline]
pub fn resize_increments(&self) -> Option<PhysicalSize<u32>> {
let _span = tracing::debug_span!("winit::Window::resize_increments",).entered();
@ -908,7 +908,7 @@ impl Window {
/// ## Platform-specific
///
/// - **macOS:** Increments are converted to logical size and then macOS rounds them to whole numbers.
/// - **Wayland / Windows:** Not implemented.
/// - **Wayland:** Not implemented.
/// - **iOS / Android / Web / Orbital:** Unsupported.
#[inline]
pub fn set_resize_increments<S: Into<Size>>(&self, increments: Option<S>) {