mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 15:13:13 -04:00
add macos with_disallow_hidpi (#1073)
* add macos with_disallow_hidpi add CHANGELOG * Always use stable rustfmt for CI. (#1074) Signed-off-by: Hal Gentz <zegentzy@protonmail.com> * add macos with_disallow_hidpi add CHANGELOG
This commit is contained in:
@@ -129,6 +129,7 @@ pub trait WindowBuilderExtMacOS {
|
||||
fn with_fullsize_content_view(self, fullsize_content_view: bool) -> WindowBuilder;
|
||||
/// Build window with `resizeIncrements` property. Values must not be 0.
|
||||
fn with_resize_increments(self, increments: LogicalSize) -> WindowBuilder;
|
||||
fn with_disallow_hidpi(self, disallow_hidpi: bool) -> WindowBuilder;
|
||||
}
|
||||
|
||||
impl WindowBuilderExtMacOS for WindowBuilder {
|
||||
@@ -182,6 +183,12 @@ impl WindowBuilderExtMacOS for WindowBuilder {
|
||||
self.platform_specific.resize_increments = Some(increments.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_disallow_hidpi(mut self, disallow_hidpi: bool) -> WindowBuilder {
|
||||
self.platform_specific.disallow_hidpi = disallow_hidpi;
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Additional methods on `MonitorHandle` that are specific to MacOS.
|
||||
|
||||
Reference in New Issue
Block a user