mod: cleanup TODO and outdated comments
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user