feat(win32 gui): read fontface and size from gui_config

This commit is contained in:
CJ van den Berg 2025-01-08 15:06:53 +01:00
parent 1acc9b107e
commit 9e4e81eb0d
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
8 changed files with 61 additions and 14 deletions

View file

@ -378,11 +378,17 @@ const cmds = struct {
pub const open_help_meta = .{ .description = "Open help" };
pub fn open_config(_: *Self, _: Ctx) Result {
const file_name = try root.get_config_file_name(@TypeOf(tui.current().config));
const file_name = try root.get_config_file_name(@import("config"));
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
}
pub const open_config_meta = .{ .description = "Edit configuration file" };
pub fn open_gui_config(_: *Self, _: Ctx) Result {
const file_name = try root.get_config_file_name(@import("gui_config"));
try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_name } });
}
pub const open_gui_config_meta = .{ .description = "Edit gui configuration file" };
pub fn create_scratch_buffer(self: *Self, ctx: Ctx) Result {
try self.check_all_not_dirty();
tui.reset_drag_context();