mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Use proper font in ImGuiColorTextEdit.
This commit is contained in:
parent
5bd35eb34e
commit
f3cc5cfd07
@ -412,8 +412,9 @@ void TextEditor::Render(const char* aTitle, const ImVec2& aSize, bool aBorder)
|
|||||||
mTextChanged = false;
|
mTextChanged = false;
|
||||||
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
auto xadv = (io.Fonts->Fonts[0]->IndexAdvanceX['X']);
|
auto font = ImGui::GetFont();
|
||||||
mCharAdvance = ImVec2(io.FontGlobalScale * xadv, io.FontGlobalScale * io.Fonts->Fonts[0]->FontSize + mLineSpacing);
|
auto xadv = (font->IndexAdvanceX['X']);
|
||||||
|
mCharAdvance = ImVec2(io.FontGlobalScale * xadv, io.FontGlobalScale * font->FontSize + mLineSpacing);
|
||||||
|
|
||||||
ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImGui::ColorConvertU32ToFloat4(mPalette[(int)PaletteIndex::Background]));
|
ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImGui::ColorConvertU32ToFloat4(mPalette[(int)PaletteIndex::Background]));
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
|
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
|
||||||
|
Loading…
Reference in New Issue
Block a user