feat(win32 gui): add reset_fontsize and rest_fontface commands
This commit is contained in:
parent
a5622af68d
commit
6530a7a51c
5 changed files with 61 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue