summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-15 10:50:30 -0300
committerpommicket <pommicket@gmail.com>2023-08-15 10:50:30 -0300
commit4ea381d6a8a2a560213de896bab2aad02a70f937 (patch)
treec0a3abe1dc27717ff1ea598dd0dbd4867f457e5b /node.c
parent50ecb07c724091ea2556fda8738d7500a77b0f9b (diff)
some settings stuff
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);
}