Closed liyunlong23 closed 2 weeks ago
Hello,
This is linked to #2701, #6471, #1018.
SetWindowFontScale()
is currently not well supported, but we should work on it.
Well, I now add setWindowFontScale(0.8f) inside the table, which is simple and convenient
Version/Branch of Dear ImGui:
Version 1.90.9-docking, Branch: docking (master/docking/etc.)
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx9.cpp
Compiler, OS:
Windows11 + MSVC 2022
Full config/build information:
No response
Details:
My Issue/Question: When I create a table in ImGui::BeginChild, in ImGui::BeginTable("##ItemList",3,ImGuiTableFlags_ScrollY, outer_size), if ImGuiTableFlags is set to ImGuiTableFlags_ScrollY, I will encounter the problem that the fontsize is forced to be restored to the initial default fontsize. I called ImGui::SetWindowFontScale(0.8f) before the child window ImGui::BeginChild; the font size in the table in the child window will be restored to 22.0f, and it should be consistent with the size of other texts FontScale(0.8f), but it is not consistent. I changed ImGuiTableFlags_ScrollY to ImGuiTableFlags_None and this problem will no longer exist. By printing my screenshots, you can see the change in font size. The font in the table is obviously forced to be restored to the initial default size.
Screenshots/Video:
Minimal, Complete and Verifiable Example code: