feat(win32 gui): add reset_fontsize and rest_fontface commands

This commit is contained in:
CJ van den Berg 2025-01-14 18:53:53 +01:00
parent a5622af68d
commit 6530a7a51c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 61 additions and 1 deletions

View file

@ -653,6 +653,12 @@ const cmds = struct {
}
pub const set_fontsize_meta = .{ .arguments = &.{.float} };
pub fn reset_fontsize(_: *Self, _: Ctx) Result {
if (build_options.gui)
tui.current().rdr.reset_fontsize();
}
pub const reset_fontsize_meta = .{ .description = "Reset font to configured size" };
pub fn set_fontface(_: *Self, ctx: Ctx) Result {
var fontface: []const u8 = undefined;
if (!try ctx.args.match(.{tp.extract(&fontface)}))
@ -661,6 +667,12 @@ const cmds = struct {
tui.current().rdr.set_fontface(fontface);
}
pub const set_fontface_meta = .{ .arguments = &.{.float} };
pub fn reset_fontface(_: *Self, _: Ctx) Result {
if (build_options.gui)
tui.current().rdr.reset_fontface();
}
pub const reset_fontface_meta = .{ .description = "Reset font to configured face" };
};
pub fn handle_editor_event(self: *Self, _: tp.pid_ref, m: tp.message) tp.result {