Forráskód Böngészése

Fonts: fixed ellipsis "..." rendering width miscalculation bug introduced in 1.91.0. (#7976)

Amend 0f63d3e9
ocornut 10 hónapja
szülő
commit
dc6346b763
2 módosított fájl, 2 hozzáadás és 1 törlés
  1. 1 0
      docs/CHANGELOG.txt
  2. 1 1
      imgui.cpp

+ 1 - 0
docs/CHANGELOG.txt

@@ -68,6 +68,7 @@ Other changes:
   (e.g. in our testing, handling of a 1 MB text buffer is now 3 times faster in VS2022 Debug build).
   This is the first step toward more refactorig. (#7925) [@alektron, @ocornut]
 - InputText: added CJK double-width punctuation to list of separators considered for CTRL+Arrow.
+- Fonts: fixed ellipsis "..." rendering width miscalculation bug introduced in 1.91.0. (#7976) [@DDeimos]
 - TextLinkOpenURL(): modified tooltip to display a verb "Open 'xxxx'". (#7885, #7660)
 - Backends: SDL2: use SDL_Vulkan_GetDrawableSize() when available. (#7967, #3190) [@scribam]
 

+ 1 - 1
imgui.cpp

@@ -4007,7 +4007,7 @@ static void SetCurrentWindow(ImGuiWindow* window)
     if (window)
     {
         g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
-        g.FontScale = g.FontSize / g.Font->FontSize;
+        g.FontScale = g.DrawListSharedData.FontScale = g.FontSize / g.Font->FontSize;
         ImGui::NavUpdateCurrentWindowIsScrollPushableX();
     }
 }