mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-28 03:25:25 +08:00
Fonts: no need to load current baked on SkipItems window? + removed unused field.
Avoid baked staying active after GC. Might cause issues. # Conflicts: # imgui.cpp
This commit is contained in:
@@ -8625,9 +8625,13 @@ void ImGui::SetCurrentFont(ImFont* font, float font_size)
|
|||||||
void ImGui::UpdateCurrentFontSize()
|
void ImGui::UpdateCurrentFontSize()
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
|
ImGuiWindow* window = g.CurrentWindow;
|
||||||
|
if (window != NULL && window->SkipItems)
|
||||||
|
return;
|
||||||
|
|
||||||
float final_size = g.FontSizeBeforeScaling * g.IO.FontGlobalScale;
|
float final_size = g.FontSizeBeforeScaling * g.IO.FontGlobalScale;
|
||||||
final_size *= g.Font->Scale;
|
final_size *= g.Font->Scale;
|
||||||
if (ImGuiWindow* window = g.CurrentWindow)
|
if (window != NULL)
|
||||||
final_size *= window->FontWindowScale;
|
final_size *= window->FontWindowScale;
|
||||||
|
|
||||||
// Round font size
|
// Round font size
|
||||||
|
|||||||
@@ -2144,7 +2144,6 @@ struct ImGuiContext
|
|||||||
float FontScale; // == FontBaked->Size / Font->FontSize. Scale factor over baked size.
|
float FontScale; // == FontBaked->Size / Font->FontSize. Scale factor over baked size.
|
||||||
float CurrentDpiScale; // Current window/viewport DpiScale == CurrentViewport->DpiScale
|
float CurrentDpiScale; // Current window/viewport DpiScale == CurrentViewport->DpiScale
|
||||||
ImDrawListSharedData DrawListSharedData;
|
ImDrawListSharedData DrawListSharedData;
|
||||||
ImVector<ImTextureData*>Textures;
|
|
||||||
double Time;
|
double Time;
|
||||||
int FrameCount;
|
int FrameCount;
|
||||||
int FrameCountEnded;
|
int FrameCountEnded;
|
||||||
|
|||||||
Reference in New Issue
Block a user