diff --git a/src/panels/detail/base.zig b/src/panels/detail/base.zig index ccf5061..e8df97d 100644 --- a/src/panels/detail/base.zig +++ b/src/panels/detail/base.zig @@ -76,6 +76,8 @@ pub const ActionButtonsOpts = struct { button_height: u32 = 28, /// Espacio entre botones spacing: i32 = 8, + /// Offset X desde el borde izquierdo del panel + x_offset: i32 = 8, }; /// Opciones para botones de navegacion @@ -96,6 +98,8 @@ pub const NavButtonsOpts = struct { button_width: u32 = 40, /// Alto de cada boton button_height: u32 = 28, + /// Offset X desde el borde izquierdo del panel + x_offset: i32 = 8, }; // ============================================================================= @@ -266,7 +270,7 @@ pub const DetailPanelBase = struct { _ = self; var result = ActionButtonsResult{}; - const x = rect.x + 8; + const x = rect.x + opts.x_offset; const bw = opts.button_width; const bh = opts.button_height; const sp = opts.spacing; @@ -321,7 +325,7 @@ pub const DetailPanelBase = struct { _ = self; var result = NavButtonsResult{}; - const x = rect.x + 8; + const x = rect.x + opts.x_offset; const bw = opts.button_width; const bh = opts.button_height; diff --git a/src/widgets/table/render.zig b/src/widgets/table/render.zig index 4ed01da..fbf950e 100644 --- a/src/widgets/table/render.zig +++ b/src/widgets/table/render.zig @@ -68,7 +68,8 @@ pub fn drawHeader( var col_x = bounds.x + @as(i32, @intCast(state_col_w)); // Draw column headers - const char_height: u32 = 8; + // Use 16 for 8x16 fonts (VGA standard, better readability) + const char_height: u32 = 16; const text_y = header_bounds.y + @as(i32, @intCast((config.header_height -| char_height) / 2)); for (columns, 0..) |col, col_idx| { @@ -191,7 +192,8 @@ pub fn drawRow( // Draw cells var col_x = row_bounds.x + @as(i32, @intCast(state_col_w)); - const char_height: u32 = 8; + // Use 16 for 8x16 fonts (VGA standard, better readability) + const char_height: u32 = 16; const text_y = row_bounds.y + @as(i32, @intCast((config.row_height -| char_height) / 2)); for (columns, 0..) |col, col_idx| { diff --git a/src/widgets/text_input.zig b/src/widgets/text_input.zig index 917d2fb..34d2cba 100644 --- a/src/widgets/text_input.zig +++ b/src/widgets/text_input.zig @@ -338,7 +338,8 @@ pub fn textInputRect( const display_color = if (state.len == 0) placeholder_color else text_color; // Calculate text position (left-aligned, vertically centered) - const char_height: u32 = 8; + // Use 16 for 8x16 fonts (VGA standard, better readability) + const char_height: u32 = 16; const text_y = inner.y + @as(i32, @intCast((inner.h -| char_height) / 2)); if (config.password and state.len > 0) {