ImDrawList, Font: Fixed bug introduced in 531c11d5c7 (#1519)

This commit is contained in:
omar 2017-12-22 20:19:48 +01:00
parent c8c872c753
commit 8d21ee56d2

View File

@ -1922,7 +1922,7 @@ static void SetCurrentWindow(ImGuiWindow* window)
ImGuiContext& g = *GImGui;
g.CurrentWindow = window;
if (window)
g.FontSize = window->CalcFontSize();
g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
}
void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
@ -5843,7 +5843,7 @@ void ImGui::SetWindowFontScale(float scale)
ImGuiContext& g = *GImGui;
ImGuiWindow* window = GetCurrentWindow();
window->FontWindowScale = scale;
g.FontSize = window->CalcFontSize();
g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
}
// User generally sees positions in window coordinates. Internally we store CursorPos in absolute screen coordinates because it is more convenient.