mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-23 04:17:00 +00:00
TreeNode() fixed alignment of collapse arrow to it matches bullet (broken in 4006fb77bc
)
This commit is contained in:
parent
5084f90a0d
commit
558430ca8f
@ -5593,7 +5593,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display
|
|||||||
bb.Max.x += (float)(int)(window->WindowPadding.x*0.5f) - 1;
|
bb.Max.x += (float)(int)(window->WindowPadding.x*0.5f) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float collapser_width = g.FontSize + padding.x*2;
|
const float collapser_width = g.FontSize + (display_frame ? padding.x*2 : padding.x);
|
||||||
const float text_width = collapser_width + (label_size.x > 0.0f ? label_size.x + padding.x*2 : 0.0f); // Include collapser
|
const float text_width = collapser_width + (label_size.x > 0.0f ? label_size.x + padding.x*2 : 0.0f); // Include collapser
|
||||||
ItemSize(ImVec2(text_width, frame_height), text_base_offset_y);
|
ItemSize(ImVec2(text_width, frame_height), text_base_offset_y);
|
||||||
|
|
||||||
|
@ -223,7 +223,8 @@ void ImGui::ShowTestWindow(bool* p_opened)
|
|||||||
|
|
||||||
if (ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size))
|
if (ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size))
|
||||||
{
|
{
|
||||||
ImGui::TextWrapped("Tip: Load fonts with io.Fonts->AddFontFromFileTTF().");
|
ImGui::SameLine();
|
||||||
|
ShowHelpMarker("Tip: Load fonts with io.Fonts->AddFontFromFileTTF()\nbefore calling io.Fonts->GetTex* functions.");
|
||||||
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
|
ImFontAtlas* atlas = ImGui::GetIO().Fonts;
|
||||||
if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight))
|
if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user