MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ScaleWindowsInViewport

Method ScaleWindowsInViewport

imgui_tiny_app/imgui/imgui.cpp:16763–16777  ·  view source on GitHub ↗

Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!)

Source from the content-addressed store, hash-verified

16761
16762// Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!)
16763void ImGui::ScaleWindowsInViewport(ImGuiViewportP* viewport, float scale)
16764{
16765 ImGuiContext& g = *GImGui;
16766 //IMGUI_DEBUG_LOG_VIEWPORT("[viewport] ScaleWindowsInViewport 0x%08X\n", viewport->ID);
16767 if (viewport->Window)
16768 {
16769 ScaleWindow(viewport->Window, scale);
16770 }
16771 else
16772 {
16773 for (ImGuiWindow* window : g.Windows)
16774 if (window->Viewport == viewport)
16775 ScaleWindow(window, scale);
16776 }
16777}
16778
16779// If the backend doesn't support ImGuiBackendFlags_HasMouseHoveredViewport or doesn't honor ImGuiViewportFlags_NoInputs for it, we do a search ourselves.
16780// A) It won't take account of the possibility that non-imgui windows may be in-between our dragged window and our target window.

Callers

nothing calls this directly

Calls 1

ScaleWindowFunction · 0.85

Tested by

no test coverage detected