Compare commits
No commits in common. "ab398304779c6962b9c3319f444b05917b93c75a" and "2abb8547a51b5731c91602cea9ab0b4539806a8d" have entirely different histories.
ab39830477
...
2abb8547a5
4 changed files with 29 additions and 42 deletions
|
|
@ -1,8 +0,0 @@
|
|||
Protocolo de inicio - Lee estos archivos EN PARALELO:
|
||||
|
||||
1. CLAUDE.md (contexto de este proyecto específico)
|
||||
2. /mnt/cello2/arno/re/recode/teamdocs/NORMAS_ESENCIALES.md (normas de trabajo, rutas, compilación)
|
||||
3. /mnt/cello2/arno/re/recode/teamdocs/LAST_UPDATE.md (cambios recientes del equipo)
|
||||
4. /mnt/cello2/arno/re/recode/teamdocs/agenda/2025-12_diciembre.md (trabajo del mes)
|
||||
|
||||
Después de leer, confirma brevemente qué sabes del proyecto y pregunta en qué puedes ayudar.
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -11,8 +11,3 @@ zig-out/
|
|||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Claude Code settings (ignorar), pero commands se versionan
|
||||
.claude/settings*.json
|
||||
.claude/*.json
|
||||
!.claude/commands/
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
//! fuente de datos (WHO, DOC, etc.)
|
||||
|
||||
const std = @import("std");
|
||||
const Style = @import("../../core/style.zig");
|
||||
|
||||
/// Dirección de ordenación
|
||||
pub const SortDirection = enum {
|
||||
|
|
@ -126,15 +125,15 @@ pub const VirtualListConfig = struct {
|
|||
colors: ?Colors = null,
|
||||
|
||||
pub const Colors = struct {
|
||||
background: Style.Color = Style.Color.rgb(255, 255, 255),
|
||||
header_background: Style.Color = Style.Color.rgb(224, 224, 224),
|
||||
row_normal: Style.Color = Style.Color.rgb(255, 255, 255),
|
||||
row_alternate: Style.Color = Style.Color.rgb(248, 248, 248),
|
||||
row_selected: Style.Color = Style.Color.rgb(0, 120, 212),
|
||||
row_selected_unfocus: Style.Color = Style.Color.rgb(208, 208, 208),
|
||||
text: Style.Color = Style.Color.rgb(0, 0, 0),
|
||||
text_selected: Style.Color = Style.Color.rgb(255, 255, 255),
|
||||
border: Style.Color = Style.Color.rgb(204, 204, 204),
|
||||
background: u32 = 0xFFFFFFFF,
|
||||
header_background: u32 = 0xFFE0E0E0,
|
||||
row_normal: u32 = 0xFFFFFFFF,
|
||||
row_alternate: u32 = 0xFFF8F8F8,
|
||||
row_selected: u32 = 0xFF0078D4,
|
||||
row_selected_unfocus: u32 = 0xFFD0D0D0,
|
||||
text: u32 = 0xFF000000,
|
||||
text_selected: u32 = 0xFFFFFFFF,
|
||||
border: u32 = 0xFFCCCCCC,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ fn drawHeader(
|
|||
const header_h = config.row_height;
|
||||
|
||||
// Header background
|
||||
ctx.pushCommand(Command.rect(
|
||||
ctx.pushCommand(Command.fill(
|
||||
bounds.x,
|
||||
bounds.y,
|
||||
bounds.w,
|
||||
|
|
@ -291,11 +291,11 @@ fn drawHeader(
|
|||
|
||||
// Column separator
|
||||
x += @as(i32, @intCast(col.width));
|
||||
ctx.pushCommand(Command.rect(x - 1, bounds.y, 1, header_h, colors.border));
|
||||
ctx.pushCommand(Command.fill(x - 1, bounds.y, 1, header_h, colors.border));
|
||||
}
|
||||
|
||||
// Bottom border
|
||||
ctx.pushCommand(Command.rect(
|
||||
ctx.pushCommand(Command.fill(
|
||||
bounds.x,
|
||||
bounds.y + @as(i32, @intCast(header_h)) - 1,
|
||||
bounds.w,
|
||||
|
|
@ -332,7 +332,7 @@ fn drawRows(
|
|||
const is_selected = list_state.selected_id != null and row.id == list_state.selected_id.?;
|
||||
const is_alternate = global_idx % 2 == 1;
|
||||
|
||||
const bg_color: Style.Color = if (is_selected)
|
||||
const bg_color: u32 = if (is_selected)
|
||||
if (list_state.has_focus) colors.row_selected else colors.row_selected_unfocus
|
||||
else if (is_alternate)
|
||||
colors.row_alternate
|
||||
|
|
@ -340,7 +340,7 @@ fn drawRows(
|
|||
colors.row_normal;
|
||||
|
||||
// Row background
|
||||
ctx.pushCommand(Command.rect(
|
||||
ctx.pushCommand(Command.fill(
|
||||
content_bounds.x,
|
||||
row_y,
|
||||
content_bounds.w,
|
||||
|
|
@ -380,7 +380,7 @@ fn drawFooter(
|
|||
list_state: *VirtualListState,
|
||||
) void {
|
||||
// Background
|
||||
ctx.pushCommand(Command.rect(
|
||||
ctx.pushCommand(Command.fill(
|
||||
bounds.x,
|
||||
bounds.y,
|
||||
bounds.w,
|
||||
|
|
@ -435,7 +435,7 @@ fn drawScrollbar(
|
|||
// Scrollbar track
|
||||
const track_x = bounds.x + @as(i32, @intCast(bounds.w - scrollbar_w));
|
||||
const track_y = bounds.y + @as(i32, @intCast(header_h));
|
||||
ctx.pushCommand(Command.rect(track_x, track_y, scrollbar_w, content_h, colors.row_alternate));
|
||||
ctx.pushCommand(Command.fill(track_x, track_y, scrollbar_w, content_h, colors.row_alternate));
|
||||
|
||||
// Thumb size and position
|
||||
const visible_ratio = @as(f32, @floatFromInt(visible_rows)) / @as(f32, @floatFromInt(total_rows));
|
||||
|
|
@ -446,7 +446,7 @@ fn drawScrollbar(
|
|||
const thumb_y = track_y + @as(i32, @intFromFloat(scroll_ratio * @as(f32, @floatFromInt(content_h - thumb_h))));
|
||||
|
||||
// Draw thumb
|
||||
ctx.pushCommand(Command.rect(track_x + 2, thumb_y, scrollbar_w - 4, thumb_h, colors.border));
|
||||
ctx.pushCommand(Command.fill(track_x + 2, thumb_y, scrollbar_w - 4, thumb_h, colors.border));
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -464,17 +464,18 @@ fn handleKeyboard(
|
|||
_ = provider;
|
||||
_ = result;
|
||||
|
||||
// Usar navKeyPressed() para soportar key repeat (tecla mantenida pulsada)
|
||||
if (ctx.input.navKeyPressed()) |key| {
|
||||
switch (key) {
|
||||
.up => list_state.moveUp(),
|
||||
.down => list_state.moveDown(visible_rows),
|
||||
.page_up => list_state.pageUp(visible_rows),
|
||||
.page_down => list_state.pageDown(visible_rows, total_rows),
|
||||
.home => list_state.goToStart(),
|
||||
.end => list_state.goToEnd(visible_rows, total_rows),
|
||||
else => {},
|
||||
}
|
||||
if (ctx.input.keyPressed(.up)) {
|
||||
list_state.moveUp();
|
||||
} else if (ctx.input.keyPressed(.down)) {
|
||||
list_state.moveDown(visible_rows);
|
||||
} else if (ctx.input.keyPressed(.page_up)) {
|
||||
list_state.pageUp(visible_rows);
|
||||
} else if (ctx.input.keyPressed(.page_down)) {
|
||||
list_state.pageDown(visible_rows, total_rows);
|
||||
} else if (ctx.input.keyPressed(.home)) {
|
||||
list_state.goToStart();
|
||||
} else if (ctx.input.keyPressed(.end)) {
|
||||
list_state.goToEnd(visible_rows, total_rows);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue