Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!)
| 16761 | |
| 16762 | // Scale all windows (position, size). Use when e.g. changing DPI. (This is a lossy operation!) |
| 16763 | void 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. |
nothing calls this directly
no test coverage detected