impr: Better centering of icons in icon buttons

This commit is contained in:
WerWolv
2023-12-14 13:49:46 +01:00
parent 003f9619c3
commit 2ebd3c6f35
2 changed files with 2 additions and 2 deletions

View File

@@ -651,7 +651,7 @@ namespace ImGuiExt {
: ImGuiCol_Button);
RenderNavHighlight(bb, id);
RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
RenderTextClipped(bb.Min + style.FramePadding, bb.Max - style.FramePadding, symbol, nullptr, &label_size, style.ButtonTextAlign, &bb);
RenderTextClipped(bb.Min + style.FramePadding * ImVec2(1.3, 1), bb.Max - style.FramePadding, symbol, nullptr, &label_size, style.ButtonTextAlign, &bb);
PopStyleColor();