mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-05 18:51:14 +08:00
(Breaking) Fonts: obsoleting SetWindowFontScale().
+ Comments # Conflicts: # imgui.cpp
This commit is contained in:
@@ -8485,11 +8485,11 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
"However, the _correct_ way of scaling your UI is currently to reload your font at the designed size, "
|
||||
"rebuild the font atlas, and call style.ScaleAllSizes() on a reference ImGuiStyle structure.\n"
|
||||
"Using those settings here will give you poor quality results.");
|
||||
static float window_scale = 1.0f;
|
||||
PushItemWidth(GetFontSize() * 8);
|
||||
if (DragFloat("window scale", &window_scale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_AlwaysClamp)) // Scale only this window
|
||||
SetWindowFontScale(window_scale);
|
||||
DragFloat("global scale", &io.FontGlobalScale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_AlwaysClamp); // Scale everything
|
||||
//static float window_scale = 1.0f;
|
||||
//if (DragFloat("window scale", &window_scale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_AlwaysClamp)) // Scale only this window
|
||||
// SetWindowFontScale(window_scale);
|
||||
PopItemWidth();
|
||||
|
||||
EndTabItem();
|
||||
|
||||
Reference in New Issue
Block a user