diff options
author | pommicket <pommicket@gmail.com> | 2022-12-29 12:23:16 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-29 12:23:16 -0500 |
commit | 7dca1a04452ca6caf6e230839c48f0f9dd9d67b8 (patch) | |
tree | 807b29089283f15a08cf809a1ff2e5984dd725f6 /hover.c | |
parent | 18fbb21e6b95139a8890ba4a65f4402df128ac84 (diff) |
hover colors
Diffstat (limited to 'hover.c')
-rw-r--r-- | hover.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -93,6 +93,8 @@ void hover_frame(Ted *ted, double dt) { return; const Settings *settings = ted_active_settings(ted); + const float padding = settings->padding; + const float border = settings->border_thickness; const u32 *colors = settings->colors; const char *text = hover->text; Font *font = ted->font; @@ -114,8 +116,11 @@ void hover_frame(Ted *ted, double dt) { state.y = y; state.render = true; state.max_y = y + height; - gl_geometry_rect(rect_xywh(x, y, width, height), colors[COLOR_AUTOCOMPLETE_BG]); - rgba_u32_to_floats(colors[COLOR_TEXT], state.color); + + Rect rect = rect_xywh(x - padding, y - padding, width + 2*padding, height + 2*padding); + gl_geometry_rect(rect, colors[COLOR_HOVER_BG]); + gl_geometry_rect_border(rect, border, colors[COLOR_HOVER_BORDER]); + rgba_u32_to_floats(colors[COLOR_HOVER_TEXT], state.color); text_utf8_with_state(font, &state, text); gl_geometry_draw(); text_render(font); |