Support viewport-relative widget sizing
This commit is contained in:
@@ -594,6 +594,11 @@ pub trait App: 'static
|
||||
/// physical dimensions.
|
||||
fn on_resize( &mut self, _width: u32, _height: u32 ) {}
|
||||
|
||||
/// Called when the compositor reports a new integer buffer scale for the
|
||||
/// main surface. The default is inert so apps that only care about physical
|
||||
/// pixels can keep using [`on_resize`](Self::on_resize).
|
||||
fn on_scale_changed( &mut self, _scale: u32 ) {}
|
||||
|
||||
/// Called once at startup with a channel sender that can be used from any
|
||||
/// thread to deliver messages into the event loop. Sending a message
|
||||
/// immediately wakes the event loop — no polling delay.
|
||||
|
||||
Reference in New Issue
Block a user