apprt/gtk: use new size structs

This commit is contained in:
Mitchell Hashimoto
2024-11-14 14:04:13 -08:00
parent bdf3d1cb5f
commit 72a3d22e69
2 changed files with 4 additions and 5 deletions

View File

@ -94,13 +94,14 @@ fn gtkUpdate(ud: ?*anyopaque) callconv(.C) c.gboolean {
return c.FALSE;
};
const grid_size = surface.core_surface.size.grid();
var buf: [32]u8 = undefined;
const text = std.fmt.bufPrintZ(
&buf,
"{d}c {d}r",
.{
surface.core_surface.grid_size.columns,
surface.core_surface.grid_size.rows,
grid_size.columns,
grid_size.rows,
},
) catch |err| {
log.err("unable to format text: {}", .{err});

View File

@ -530,9 +530,7 @@ pub fn displayRealize(self: *OpenGL) !void {
self.texture_color_resized = 0;
// We need to reset our uniforms
if (self.screen_size) |size| {
self.deferred_screen_size = .{ .size = size };
}
self.deferred_screen_size = .{ .size = self.size };
self.deferred_font_size = .{ .metrics = self.grid_metrics };
self.deferred_config = .{};
}