Clarify DPI docs to highlight WindowEvent::HiDpiFactorChanged (#598)

* Clarify DPI docs to highlight WindowEvent::HiDpiFactorChanged

* Address review of #598

* dpi docs: grammar corrections

* The final nitpick
This commit is contained in:
Victor Berger 2018-07-16 16:44:29 +02:00 committed by Francesca Frangipane
parent 8c78013257
commit 0cb5450999
2 changed files with 21 additions and 7 deletions

View file

@ -304,6 +304,10 @@ impl Window {
///
/// See the [`dpi`](dpi/index.html) module for more information.
///
/// Note that this value can change depending on user action (for example if the window is
/// moved to another screen); as such, tracking `WindowEvent::HiDpiFactorChanged` events is
/// the most robust way to track the DPI you need to use to draw.
///
/// ## Platform-specific
///
/// - **X11:** Can be overridden using the `WINIT_HIDPI_FACTOR` environment variable.