summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'node.c')
-rw-r--r--node.c7
1 files changed, 3 insertions, 4 deletions
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);
}