Skip to content

Commit

Permalink
Merge pull request #586 from mackron/button_text_alignment
Browse files Browse the repository at this point in the history
Fix button text alignment
  • Loading branch information
RobLoach authored Nov 16, 2023
2 parents a18175c + 42e4c54 commit 141d3cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuklear",
"version": "4.10.6",
"version": "4.10.7",
"repo": "Immediate-Mode-UI/Nuklear",
"description": "A small ANSI C gui toolkit",
"keywords": ["gl", "ui", "toolkit"],
Expand Down
4 changes: 2 additions & 2 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -23892,8 +23892,8 @@ nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r,
/* calculate button content space */
content->x = r.x + style->padding.x + style->border + style->rounding;
content->y = r.y + style->padding.y + style->border + style->rounding;
content->w = r.w - (2 * style->padding.x + style->border + style->rounding*2);
content->h = r.h - (2 * style->padding.y + style->border + style->rounding*2);
content->w = r.w - (2 * (style->padding.x + style->border + style->rounding));
content->h = r.h - (2 * (style->padding.y + style->border + style->rounding));

/* execute button behavior */
bounds.x = r.x - style->touch_padding.x;
Expand Down
4 changes: 2 additions & 2 deletions src/nuklear_button.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r,
/* calculate button content space */
content->x = r.x + style->padding.x + style->border + style->rounding;
content->y = r.y + style->padding.y + style->border + style->rounding;
content->w = r.w - (2 * style->padding.x + style->border + style->rounding*2);
content->h = r.h - (2 * style->padding.y + style->border + style->rounding*2);
content->w = r.w - (2 * (style->padding.x + style->border + style->rounding));
content->h = r.h - (2 * (style->padding.y + style->border + style->rounding));

/* execute button behavior */
bounds.x = r.x - style->touch_padding.x;
Expand Down

0 comments on commit 141d3cf

Please sign in to comment.