Skip to content

Commit d78c121

Browse files
committed
imgui bump
1 parent 8f3bf1a commit d78c121

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

src/frontend/ui/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CPMAddPackage(
22
NAME imgui
33
GITHUB_REPOSITORY ocornut/imgui
4-
GIT_TAG v1.91.8-docking
4+
GIT_TAG v1.92.4-docking
55
DOWNLOAD_ONLY YES
66
)
77

src/frontend/ui/UI.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static void setupStandardFont(SDL_Window* window, SDL_Renderer* renderer)
156156

157157
const float font_scaling_factor = getFontScale(window, renderer);
158158
if (!std::filesystem::exists(fontFile)) {
159-
io.FontGlobalScale = font_scaling_factor;
159+
// io.FontGlobalScale = font_scaling_factor;
160160
} else {
161161
constexpr int DefaultFontSize = 13;
162162
ImFontConfig config;
@@ -166,10 +166,6 @@ static void setupStandardFont(SDL_Window* window, SDL_Renderer* renderer)
166166

167167
// TODO: Load to memory for unicode paths and load via AddFontFromMemoryTTF
168168
io.Fonts->AddFontFromFileTTF(fontFile.generic_string().c_str(), config.SizePixels, &config);
169-
#ifdef IG_OS_WINDOWS
170-
// Why is this needed on Windows but not on other systems??
171-
io.FontGlobalScale = 1 / font_scaling_factor;
172-
#endif
173169
}
174170
}
175171

@@ -194,8 +190,6 @@ void setup(SDL_Window* window, SDL_Renderer* renderer, bool useDocking, float dp
194190
IG_UNUSED(useDocking);
195191
#endif
196192

197-
setupStandardFont(window, renderer);
198-
199193
ImGuiStyle& style = ImGui::GetStyle();
200194
style.GrabRounding = 3;
201195
style.TabRounding = 3;
@@ -222,6 +216,8 @@ void setup(SDL_Window* window, SDL_Renderer* renderer, bool useDocking, float dp
222216
ImGuiSDL::Initialize(renderer, width, height);
223217
}
224218
#endif
219+
220+
setupStandardFont(window, renderer);
225221
}
226222

227223
void shutdown()

0 commit comments

Comments
 (0)