mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-23 22:59:10 +00:00
Fonts: PushFontSize() with -1 uses sources[0]'s size for now (backward compat design)
This commit is contained in:
@@ -8636,7 +8636,7 @@ void ImGui::PushFont(ImFont* font, float font_size)
|
|||||||
if (font == NULL)
|
if (font == NULL)
|
||||||
font = GetDefaultFont();
|
font = GetDefaultFont();
|
||||||
if (font_size < 0.0f)
|
if (font_size < 0.0f)
|
||||||
font_size = g.FontSize;
|
font_size = font->Sources[0].SizePixels; // g.FontSize;
|
||||||
g.FontStack.push_back({ font, font_size });
|
g.FontStack.push_back({ font, font_size });
|
||||||
SetCurrentFont(font, font_size);
|
SetCurrentFont(font, font_size);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user