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
|
- Angled Headers: angled section for column being reordered via the regular headers
|
||||||
stays highlighted during reordering.
|
stays highlighted during reordering.
|
||||||
- Style:
|
- 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().
|
- Border sizes are now scaled (and rounded) by ScaleAllSizes().
|
||||||
- When using large values with ScallAllSizes(), the following items thickness
|
- When using large values with ScallAllSizes(), the following items thickness
|
||||||
are scaled to integer amounts:
|
are scaled to integer amounts:
|
||||||
|
|||||||
+3
-1
@@ -3258,7 +3258,9 @@ void ImFontAtlasBuildNotifySetFont(ImFontAtlas* atlas, ImFont* old_font, ImFont*
|
|||||||
shared_data->Font = new_font;
|
shared_data->Font = new_font;
|
||||||
if (ImGuiContext* ctx = shared_data->Context)
|
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;
|
continue;
|
||||||
|
|
||||||
if (ctx->IO.FontDefault == old_font)
|
if (ctx->IO.FontDefault == old_font)
|
||||||
|
|||||||
Reference in New Issue
Block a user