Skip to content

Commit

Permalink
Fix bugged background color and component name color
Browse files Browse the repository at this point in the history
  • Loading branch information
rj45 committed May 12, 2024
1 parent bea419b commit b829745
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void frame(void *user_data) {
.colors[0] =
{.load_action = SG_LOADACTION_CLEAR,
.store_action = SG_STOREACTION_STORE,
.clear_value = {0.0f, 0.0f, 0.0f, 1.0f}},
.clear_value = {0.08f, 0.1f, 0.12f, 1.0f}},
},
.swapchain = sglue_swapchain()};
sg_begin_pass(&pass);
Expand Down
9 changes: 7 additions & 2 deletions src/render/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,14 @@ void draw_label(
DrawContext *draw, Theme *theme, Box box, const char *text,
DrawLabelType type, DrawFlags flags) {

HMM_Vec4 color = theme->color.labelColor;
if (type == LABEL_COMPONENT_NAME) {
color = theme->color.nameColor;
}

draw_text(
draw, box, text, strlen(text), theme->labelFontSize, theme->font,
theme->color.labelColor, HMM_V4(0, 0, 0, 0));
draw, box, text, strlen(text), theme->labelFontSize, theme->font, color,
HMM_V4(0, 0, 0, 0));
}

Box draw_text_bounds(
Expand Down

0 comments on commit b829745

Please sign in to comment.