mod: cleanup TODO and outdated comments

This commit is contained in:
2025-11-05 18:32:49 +01:00
parent a83e86f8d9
commit e53bb7880b
8 changed files with 10 additions and 10 deletions

View File

@@ -228,11 +228,16 @@ pub fn Scrollable(Model: type, Event: type) type {
configuration: Configuration,
pub const Configuration = packed struct {
// TODO the scrollbar bool and the color should be in their own struct using `enabled` and `color` inside of the struct to be more consistent with other `Configuration` structs
scrollbar: bool,
/// Primary color to be used for the scrollbar (and background if enabled)
color: Color = .default,
/// With a backgroud the `color` rendered with emphasis `.dim`
/// will be used to highlight the scrollbar from the background;
/// otherwise nothing is shown for the background
show_background: bool = false,
/// should the scrollbar be shown for the x-axis (horizontal)
x_axis: bool = false,
/// should the scrollbar be shown for the y-axis (vertical)
y_axis: bool = false,
pub const disabled: @This() = .{ .scrollbar = false };
@@ -671,6 +676,7 @@ pub fn Button(Model: type, Event: type, Queue: type) fn (meta.FieldEnum(Event))
pub fn button_fn(accept_event: meta.FieldEnum(Event)) type {
{ // check for type correctness and the associated type to use for the passed `accept_event`
const err_msg = "Unexpected type for the associated input completion event to trigger. Only `void` is allowed.";
// TODO supported nested tagged unions to be also be used for triggering if the enum is then still of `void`type!
switch (@typeInfo(@FieldType(Event, @tagName(accept_event)))) {
.void => |_| {},
else => @compileError(err_msg),