MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / syncWindowMetrics

Method syncWindowMetrics

App/GUI/interface/interface.cpp:144–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void Interface::syncWindowMetrics() {
145 int width = 0;
146 int height = 0;
147 glfwGetFramebufferSize(window_, &width, &height);
148
149 if (width <= 0 || height <= 0) {
150 return;
151 }
152
153 if (width == lastWindowWidth_ && height == lastWindowHeight_) {
154 return;
155 }
156
157 lastWindowWidth_ = width;
158 lastWindowHeight_ = height;
159 const float previousScale = styleManager.getScale();
160 styleManager.onResize(glm::ivec2(width, height));
161 if (std::abs(previousScale - styleManager.getScale()) > 0.001f) {
162 pendingUiScaleRefresh_ = true;
163 }
164}
165
166void Interface::shutdown() {
167 ImGui_ImplWGPU_Shutdown();

Callers

nothing calls this directly

Calls 2

getScaleMethod · 0.80
onResizeMethod · 0.80

Tested by

no test coverage detected