From bf59ca6a1ba85fb9baf47e44f6cd0fd3bf6fe178 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Sun, 21 Jun 2026 23:39:14 -0700 Subject: [PATCH] Make the info overlay position fixed (bottom left) PiperOrigin-RevId: 935868629 Change-Id: I26b8d50f276b05c9869ea0f6cc5c3033ab6ef2f9 --- src/experimental/studio/app.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/experimental/studio/app.cc b/src/experimental/studio/app.cc index e093b227..0cfa1302 100644 --- a/src/experimental/studio/app.cc +++ b/src/experimental/studio/app.cc @@ -936,8 +936,21 @@ void App::BuildGui() { if (tmp_.stats) { platform::ScopedStyle style; - style.Var(ImGuiStyleVar_Alpha, 0.6f); - if (ImGui::Begin("Info", &tmp_.stats)) { + style.Var(ImGuiStyleVar_Alpha, 0.8f); + const float scale = ImGui::GetWindowDpiScale(); + ImGui::SetNextWindowPos( + ImVec2(workspace_rect.x, + workspace_rect.y + workspace_rect.w), + ImGuiCond_Always, ImVec2(0.0f, 1.0f)); + ImGui::SetNextWindowSizeConstraints(ImVec2(240.0f * scale, -1.0f), + ImVec2(FLT_MAX, -1.0f)); + const ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar | + ImGuiWindowFlags_NoResize | + ImGuiWindowFlags_NoMove | + ImGuiWindowFlags_NoCollapse | + ImGuiWindowFlags_AlwaysAutoResize | + ImGuiWindowFlags_NoSavedSettings; + if (ImGui::Begin("Info", nullptr, flags)) { const float fps = renderer_->GetFps(); platform::StatsGui( model(), data(),