Support viewport-relative widget sizing
CI / build + test (push) Has been cancelled
CI / cargo audit (push) Has been cancelled

This commit is contained in:
yamabush1
2026-06-04 12:38:59 +02:00
parent ae8380b1ac
commit 68c6a87bf6
8 changed files with 61 additions and 33 deletions
+1
View File
@@ -411,6 +411,7 @@ impl<A: App> AppData<A>
// configure.new_size is surface-local (logical), so multiply by the
// current buffer scale before handing the dimensions to the app.
let sf = self.main.scale_factor.max( 1 ) as u32;
self.app.on_scale_changed( sf );
self.app.on_resize( w * sf, h * sf );
// `on_resize` may flip app-state that the view depends on (apps that
// branch on the new dimensions, layout caches keyed by size, …), so
+1
View File
@@ -99,6 +99,7 @@ impl<A: App> CompositorHandler for AppData<A>
// `App::on_resize`.
if matches!( focus, super::SurfaceFocus::Main )
{
self.app.on_scale_changed( new_factor as u32 );
self.app.on_resize( pw, ph );
self.dirty_caches();
}