content scale change events should also impact viewport padding

This calculates the new padding pixel values and propogates those
changes to the renderer.
This commit is contained in:
Mitchell Hashimoto
2023-09-02 10:59:50 -07:00
parent 6c7ccae848
commit 22eb533473
7 changed files with 83 additions and 11 deletions

View File

@@ -20,8 +20,14 @@ pub const Message = union(enum) {
/// the size changes.
font_size: font.face.DesiredSize,
/// Change the screen size.
screen_size: renderer.ScreenSize,
/// Changes the screen size.
resize: struct {
/// The full screen (drawable) size. This does NOT include padding.
screen_size: renderer.ScreenSize,
/// The explicit padding values.
padding: renderer.Padding,
},
/// The derived configuration to update the renderer with.
change_config: struct {