Skip to content

Commit 141d3cf

Browse files
authored
Merge pull request #586 from mackron/button_text_alignment
Fix button text alignment
2 parents a18175c + 42e4c54 commit 141d3cf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clib.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuklear",
3-
"version": "4.10.6",
3+
"version": "4.10.7",
44
"repo": "Immediate-Mode-UI/Nuklear",
55
"description": "A small ANSI C gui toolkit",
66
"keywords": ["gl", "ui", "toolkit"],

nuklear.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23892,8 +23892,8 @@ nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r,
2389223892
/* calculate button content space */
2389323893
content->x = r.x + style->padding.x + style->border + style->rounding;
2389423894
content->y = r.y + style->padding.y + style->border + style->rounding;
23895-
content->w = r.w - (2 * style->padding.x + style->border + style->rounding*2);
23896-
content->h = r.h - (2 * style->padding.y + style->border + style->rounding*2);
23895+
content->w = r.w - (2 * (style->padding.x + style->border + style->rounding));
23896+
content->h = r.h - (2 * (style->padding.y + style->border + style->rounding));
2389723897

2389823898
/* execute button behavior */
2389923899
bounds.x = r.x - style->touch_padding.x;

src/nuklear_button.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ nk_do_button(nk_flags *state, struct nk_command_buffer *out, struct nk_rect r,
127127
/* calculate button content space */
128128
content->x = r.x + style->padding.x + style->border + style->rounding;
129129
content->y = r.y + style->padding.y + style->border + style->rounding;
130-
content->w = r.w - (2 * style->padding.x + style->border + style->rounding*2);
131-
content->h = r.h - (2 * style->padding.y + style->border + style->rounding*2);
130+
content->w = r.w - (2 * (style->padding.x + style->border + style->rounding));
131+
content->h = r.h - (2 * (style->padding.y + style->border + style->rounding));
132132

133133
/* execute button behavior */
134134
bounds.x = r.x - style->touch_padding.x;

0 commit comments

Comments
 (0)