mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-26 18:52:01 +00:00
Fix up API calls for initialization
This commit is contained in:
@@ -1070,8 +1070,11 @@ pub const Inspector = struct {
|
||||
// Cache our scale because we use it for cursor position calculations.
|
||||
self.content_scale = x;
|
||||
|
||||
// Setup a new style and scale it appropriately.
|
||||
var style: cimgui.c.ImGuiStyle = .{};
|
||||
// Setup a new style and scale it appropriately. We must use the
|
||||
// ImGuiStyle constructor to get proper default values (e.g.,
|
||||
// CurveTessellationTol) rather than zero-initialized values.
|
||||
var style: cimgui.c.ImGuiStyle = undefined;
|
||||
cimgui.ext.ImGuiStyle_ImGuiStyle(&style);
|
||||
cimgui.c.ImGuiStyle_ScaleAllSizes(&style, @floatCast(x));
|
||||
const active_style = cimgui.c.ImGui_GetStyle();
|
||||
active_style.* = style;
|
||||
|
||||
Reference in New Issue
Block a user