There was an error while loading. Please reload this page.
1 parent a0768e1 commit 8a43bf7Copy full SHA for 8a43bf7
imgui-knobs.cpp
@@ -162,7 +162,13 @@ namespace ImGuiKnobs {
162
163
auto speed = _speed == 0 ? (v_max - v_min) / 250.f : _speed;
164
ImGui::PushID(label);
165
- auto width = size == 0 ? ImGui::GetTextLineHeight() * 4.0f : size * ImGui::GetIO().FontGlobalScale;
+
166
+#if IMGUI_VERSION_NUM < 19197
167
+ auto font_scale = ImGui::GetIO().FontGlobalScale;
168
+#else
169
+ auto font_scale = ImGui::GetStyle().FontScaleMain;
170
+#endif
171
+ auto width = size == 0 ? ImGui::GetTextLineHeight() * 4.0f : size * font_scale;
172
ImGui::PushItemWidth(width);
173
174
ImGui::BeginGroup();
0 commit comments