diff --git a/src/widgets/button.zig b/src/widgets/button.zig index a3ab270..bde519c 100644 --- a/src/widgets/button.zig +++ b/src/widgets/button.zig @@ -71,8 +71,8 @@ pub fn buttonRect(ctx: *Context, bounds: Layout.Rect, text: []const u8, config: const pressed = hovered and ctx.input.mouseDown(.left); const clicked = hovered and ctx.input.mouseReleased(.left); - // Determine colors based on state - const theme = Style.Theme.dark; + // Determine colors based on state (Z-Design: usar theme dinámico) + const theme = Style.currentTheme().*; const base_bg = config.bg orelse switch (config.importance) { .normal => theme.button_bg, @@ -159,8 +159,8 @@ pub fn buttonStatefulRect( // Update transition animation state.transition.updateWithPress(hovered, pressed, dt_ms); - // Determine colors based on animated state - const theme = Style.Theme.dark; + // Determine colors based on animated state (Z-Design: usar theme dinámico) + const theme = Style.currentTheme().*; const base_bg = config.bg orelse switch (config.importance) { .normal => theme.button_bg, diff --git a/src/widgets/checkbox.zig b/src/widgets/checkbox.zig index 81fcd03..523c000 100644 --- a/src/widgets/checkbox.zig +++ b/src/widgets/checkbox.zig @@ -57,8 +57,8 @@ pub fn checkboxRect( changed = true; } - // Theme colors - const theme = Style.Theme.dark; + // Theme colors (Z-Design: usar theme dinámico) + const theme = Style.currentTheme().*; // Calculate box position (vertically centered) const box_y = bounds.y + @as(i32, @intCast((bounds.h -| config.box_size) / 2)); diff --git a/src/widgets/list.zig b/src/widgets/list.zig index 15ed457..d50e51c 100644 --- a/src/widgets/list.zig +++ b/src/widgets/list.zig @@ -121,14 +121,15 @@ pub fn listRect( if (items.len == 0) { // Draw empty list if (config.show_border) { - const theme = Style.Theme.dark; + const theme = Style.currentTheme().*; ctx.pushCommand(Command.rect(bounds.x, bounds.y, bounds.w, bounds.h, theme.background)); ctx.pushCommand(Command.rectOutline(bounds.x, bounds.y, bounds.w, bounds.h, theme.border)); } return result; } - const theme = Style.Theme.dark; + // Z-Design: usar theme dinámico + const theme = Style.currentTheme().*; const mouse = ctx.input.mousePos(); const list_hovered = bounds.contains(mouse.x, mouse.y); diff --git a/src/widgets/select.zig b/src/widgets/select.zig index bccb94b..f798373 100644 --- a/src/widgets/select.zig +++ b/src/widgets/select.zig @@ -99,7 +99,8 @@ pub fn selectRect( // Register as focusable in the active focus group ctx.registerFocusable(widget_id); - const theme = Style.Theme.dark; + // Z-Design: usar theme dinámico + const theme = Style.currentTheme().*; // Check mouse interaction on main button const mouse = ctx.input.mousePos(); diff --git a/src/widgets/text_input.zig b/src/widgets/text_input.zig index bcad615..e8740b3 100644 --- a/src/widgets/text_input.zig +++ b/src/widgets/text_input.zig @@ -278,8 +278,8 @@ pub fn textInputRect( // Sync state.focused for backwards compatibility state.focused = has_focus; - // Theme colors - const theme = Style.Theme.dark; + // Theme colors (Z-Design: usar theme dinámico) + const theme = Style.currentTheme().*; const bg_color = if (has_focus) theme.input_bg.lighten(5) else theme.input_bg; // Use override colors if provided, otherwise use theme defaults const border_color = config.border_color orelse (if (has_focus) theme.primary else theme.input_border);