mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Demo: Fixed Fonts "set as default button" not having collading id on collapsed nodes.
This commit is contained in:
parent
08e411c310
commit
fce41d0b55
@ -1951,6 +1951,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
for (int i = 0; i < atlas->Fonts.Size; i++)
|
||||
{
|
||||
ImFont* font = atlas->Fonts[i];
|
||||
ImGui::PushID(font);
|
||||
bool font_details_opened = ImGui::TreeNode(font, "Font %d: \'%s\', %.2f px, %d glyphs", i, font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size);
|
||||
ImGui::SameLine(); if (ImGui::SmallButton("Set as default")) ImGui::GetIO().FontDefault = font;
|
||||
if (font_details_opened)
|
||||
@ -2011,6 +2012,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
}
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
static float window_scale = 1.0f;
|
||||
ImGui::DragFloat("this window scale", &window_scale, 0.005f, 0.3f, 2.0f, "%.1f"); // scale only this window
|
||||
|
Loading…
Reference in New Issue
Block a user