Clarify scale_factor docs
Wayland scales each window individually, thus make it clear. Also recommend against using the `MonitorHandle::scale_factor`. Fixes #3183.
This commit is contained in:
parent
92b7dcccc1
commit
075dfcea19
3 changed files with 13 additions and 5 deletions
|
|
@ -543,14 +543,17 @@ impl Window {
|
|||
self.window.maybe_wait_on_main(|w| WindowId(w.id()))
|
||||
}
|
||||
|
||||
/// Returns the scale factor that can be used to map logical pixels to physical pixels, and vice versa.
|
||||
///
|
||||
/// See the [`dpi`](crate::dpi) module for more information.
|
||||
/// Returns the scale factor that can be used to map logical pixels to physical pixels, and
|
||||
/// vice versa.
|
||||
///
|
||||
/// Note that this value can change depending on user action (for example if the window is
|
||||
/// moved to another screen); as such, tracking [`WindowEvent::ScaleFactorChanged`] events is
|
||||
/// the most robust way to track the DPI you need to use to draw.
|
||||
///
|
||||
/// This value may differ from [`MonitorHandle::scale_factor`].
|
||||
///
|
||||
/// See the [`dpi`](crate::dpi) module for more information.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **X11:** This respects Xft.dpi, and can be overridden using the `WINIT_X11_SCALE_FACTOR` environment variable.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue