paint: ui tweaks

This commit is contained in:
luboslenco
2026-06-14 12:30:53 +02:00
parent f680f9f50a
commit a67b77dd08
2 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -89,7 +89,7 @@ void nodes_material_new_group_button(i32 node_id) {
break;
}
}
if (ui_button(tr("Nodes"), UI_ALIGN_CENTER, "")) {
if (ui_icon_button(tr("Nodes"), ICON_NODES, UI_ALIGN_CENTER)) {
any_array_push(ui_nodes_group_stack, group);
}
}
@@ -115,7 +115,7 @@ void nodes_material_add_socket_menu_draw() {
}
void nodes_material_add_socket_button(ui_nodes_t *nodes, ui_node_t *node, ui_node_socket_t_array_t *sockets) {
if (ui_button(tr("Add"), UI_ALIGN_CENTER, "")) {
if (ui_icon_button(tr("Add"), ICON_PLUS, UI_ALIGN_CENTER)) {
gc_unroot(_nodes_material_nodes);
_nodes_material_nodes = nodes;
gc_root(_nodes_material_nodes);
+4 -1
View File
@@ -682,12 +682,15 @@ void ui_nodes_draw_menubar() {
if (g_ui->is_hovered) {
ui_tooltip(string("%s (%s)", tr("Search for nodes"), any_map_get(g_keymap, "node_search")));
}
g_ui->_x += g_ui->_w + 3;
g_ui->_y = 2 + start_y;
g_theme->BUTTON_COL = _BUTTON_COL;
g_theme->SHADOWS = _SHADOWS;
// Close node group
if (ui_nodes_group_stack->length > 0 && ui_menubar_button(tr("Close"))) {
g_ui->_w = ew;
if (ui_nodes_group_stack->length > 0 && ui_icon_button(tr("Back"), ICON_ARROW_LEFT, UI_ALIGN_CENTER)) {
array_pop(ui_nodes_group_stack);
}
}