Skip to content

Commit

Permalink
default image_padding is 0, so use style->padding instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Dodzey committed Aug 31, 2024
1 parent 00d94e5 commit 44a5e68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nuklear.h
Original file line number Diff line number Diff line change
Expand Up @@ -24565,8 +24565,8 @@ nk_do_button_text_image(nk_flags *state,
content.x += icon.w;
content.w = NK_MAX(content.w - icon.w, 0);

content.x += style->image_padding.x;
content.w -= style->image_padding.x;
content.x += style->padding.x;
content.w -= style->padding.x;
}

icon.x += style->image_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 @@ -403,8 +403,8 @@ nk_do_button_text_image(nk_flags *state,
content.x += icon.w;
content.w = NK_MAX(content.w - icon.w, 0);

content.x += style->image_padding.x;
content.w -= style->image_padding.x;
content.x += style->padding.x;
content.w -= style->padding.x;
}

icon.x += style->image_padding.x;
Expand Down

0 comments on commit 44a5e68

Please sign in to comment.