From 44a5e68e3ecd23b9b0fe8dfc75a959a45f8f9d55 Mon Sep 17 00:00:00 2001 From: Dodzey <8467637+Dodzey@users.noreply.github.com> Date: Sat, 31 Aug 2024 18:25:22 +0100 Subject: [PATCH] default image_padding is 0, so use style->padding instead --- nuklear.h | 4 ++-- src/nuklear_button.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nuklear.h b/nuklear.h index 551cd0a13..bb7ebb004 100644 --- a/nuklear.h +++ b/nuklear.h @@ -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; diff --git a/src/nuklear_button.c b/src/nuklear_button.c index d2f6e0801..08e2991ac 100644 --- a/src/nuklear_button.c +++ b/src/nuklear_button.c @@ -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;