pub struct XScalingMode(pub u32);
Expand description
The scaling mode of X windows.
Tuple Fields§
§0: u32
Implementations§
Source§impl XScalingMode
impl XScalingMode
Sourcepub const DEFAULT: Self
pub const DEFAULT: Self
The default mode.
Currently this means that windows are rendered at the lowest scale and then upscaled if necessary.
Sourcepub const DOWNSCALED: Self
pub const DOWNSCALED: Self
Windows are rendered at the highest integer scale and then downscaled.
This has significant performance implications unless the window is running on the output with the highest scale and that scale is an integer scale.
For example, on a 3840x2160 output with a 1.5 scale, a fullscreen window will be rendered at 3840x2160 * 2 / 1.5 = 5120x2880 pixels and then downscaled to 3840x2160. This overhead gets worse the lower the scale of the output is.
Additionally, this mode requires the X window to scale its contents itself. In the
example above, you might achieve this by setting the environment variable
GDK_SCALE=2
.
Trait Implementations§
Source§impl Clone for XScalingMode
impl Clone for XScalingMode
Source§fn clone(&self) -> XScalingMode
fn clone(&self) -> XScalingMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more