From a9b73a66035ad35ea2cc3d7a3203a1826d6fde79 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 13 Nov 2021 18:56:47 +0100 Subject: [PATCH] cc_frm_button: remove offset between icon and text Text object has an own internal offset. Therefore, I think it is not required. Possible side effects are not to be ruled out and remains to be seen. --- src/gui/components/cc_frm_button.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_button.cpp b/src/gui/components/cc_frm_button.cpp index 738bd17e1..04cada95a 100644 --- a/src/gui/components/cc_frm_button.cpp +++ b/src/gui/components/cc_frm_button.cpp @@ -201,7 +201,7 @@ void CComponentsButton::initCaption() Font *tmp_font = cc_btn_font; int h_cap = min(cc_btn_text_obj->getHeight(), tmp_font->getHeight()); int w_cap = tmp_font->getRenderWidth(cc_btn_text); - int dx_tmp = x_offset + dx_icon_obj + x_offset + w_cap - frame; + int dx_tmp = x_offset + dx_icon_obj + w_cap - frame; /* If the required sum for space of icon, text, frame and offsets is too small then adapt font size. */