ltk::types

Function set_density

Source
pub fn set_density(d: f32)
Expand description

Set the process-wide pixel density used by Length::dp (the WidgetScaling::Physical mode). The runtime sets it to the main surface’s buffer scale right before crate::App::on_scale_changed, so dp( n ) is n logical px by default; an app that wants a DPI-derived density overrides it from that callback. Default: 1.0.