mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-06 07:38:35 +00:00
Fonts: fixed an issue introduced in 1.92.6 where style.FontBaseSize would be cleared during the first frame if no fonts was explicitely added before.
Amend 3aba95060e
This commit is contained in:
@@ -109,6 +109,8 @@ Other Changes:
|
||||
- Angled Headers: angled section for column being reordered via the regular headers
|
||||
stays highlighted during reordering.
|
||||
- Style:
|
||||
- Fonts: fixed an issue introduced in 1.92.6 where style.FontBaseSize would be
|
||||
cleared during the first frame if no fonts was explicitely added before.
|
||||
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||
- When using large values with ScallAllSizes(), the following items thickness
|
||||
are scaled to integer amounts:
|
||||
|
||||
@@ -3258,7 +3258,9 @@ void ImFontAtlasBuildNotifySetFont(ImFontAtlas* atlas, ImFont* old_font, ImFont*
|
||||
shared_data->Font = new_font;
|
||||
if (ImGuiContext* ctx = shared_data->Context)
|
||||
{
|
||||
if (ctx->FrameCount == 0 && old_font == NULL) // While this should work either way, we save ourselves the bother / debugging confusion of running ImGui code so early when it is not needed.
|
||||
// While this should work either way, we save ourselves the bother / debugging confusion of running ImGui code so early when it is not needed.
|
||||
// Also fixes erroneously rewriting style.FontSizeBase during init if adding default fonts.
|
||||
if (old_font == NULL && ctx->Font == NULL && ctx->FontSizeBase == 0.0f)
|
||||
continue;
|
||||
|
||||
if (ctx->IO.FontDefault == old_font)
|
||||
|
||||
Reference in New Issue
Block a user