Добавлены остальные инструменты
This commit is contained in:
@@ -196,16 +196,21 @@ fn drawToolbar(canvas: *Canvas) void {
|
||||
},
|
||||
);
|
||||
{
|
||||
var to_select: ?usize = null;
|
||||
for (tools_list, 0..) |*tool_desc, i| {
|
||||
const is_selected = (canvas.toolbar.selected_index == i);
|
||||
const is_selected = canvas.toolbar.selected_index == i;
|
||||
const selected_fill = dvui.themeGet().focus;
|
||||
const opts: dvui.Options = .{
|
||||
.id_extra = i,
|
||||
.color_fill = if (is_selected) dvui.themeGet().fill else undefined,
|
||||
.color_fill = if (is_selected) selected_fill else null,
|
||||
};
|
||||
if (dvui.buttonIcon(@src(), tool_desc.name, tool_desc.icon_tvg, .{}, .{}, opts)) {
|
||||
canvas.toolbar.select(i);
|
||||
to_select = i;
|
||||
}
|
||||
}
|
||||
if (to_select) |index| {
|
||||
canvas.toolbar.select(index);
|
||||
}
|
||||
}
|
||||
bar.deinit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user