From 4ea381d6a8a2a560213de896bab2aad02a70f937 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 15 Aug 2023 10:50:30 -0300 Subject: some settings stuff --- node.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'node.c') diff --git a/node.c b/node.c index 9b7fbed..f224a7f 100644 --- a/node.c +++ b/node.c @@ -293,7 +293,6 @@ void node_frame(Ted *ted, Node *node, Rect r) { const Settings *settings = ted_active_settings(ted); if (node->tabs) { bool is_active = node == ted->active_node; - const u32 *colors = settings->colors; Font *font = ted->font; const float border_thickness = settings->border_thickness; const float char_height = text_font_char_height(font); @@ -395,7 +394,7 @@ void node_frame(Ted *ted, Node *node, Rect r) { } // tab border - gl_geometry_rect_border(tab_rect, border_thickness, colors[COLOR_BORDER]); + gl_geometry_rect_border(tab_rect, border_thickness, settings_color(settings, COLOR_BORDER)); rect_shrink(&tab_rect, border_thickness); // tab title @@ -408,7 +407,7 @@ void node_frame(Ted *ted, Node *node, Rect r) { strbuf_printf(tab_title, "%s", filename); } text_state.max_x = rect_x2(tab_rect); - rgba_u32_to_floats(colors[COLOR_TEXT], text_state.color); + settings_color_floats(settings, COLOR_TEXT, text_state.color); text_state.x = tab_rect.pos.x; text_state.y = tab_rect.pos.y; text_state_break_kerning(&text_state); @@ -416,7 +415,7 @@ void node_frame(Ted *ted, Node *node, Rect r) { if (i == node->active_tab) { // highlight active tab - gl_geometry_rect(tab_rect, colors[is_active ? COLOR_ACTIVE_TAB_HL : COLOR_SELECTED_TAB_HL]); + gl_geometry_rect(tab_rect, settings_color(settings, is_active ? COLOR_ACTIVE_TAB_HL : COLOR_SELECTED_TAB_HL)); // set window title to active tab's title strbuf_printf(ted->window_title, "ted %s", tab_title); } -- cgit v1.2.3