From 0dcc09fc5f2ed1a3e07c11e9ed797735e2439ee2 Mon Sep 17 00:00:00 2001 From: DanS Date: Sat, 18 Jul 2026 18:03:11 -0500 Subject: [PATCH] fix(console): DPI-scale the toolbar status-dot offsets The status indicator's left inset (+2) and dot-to-text reservation (+6) were raw pixels while the dot radius is DPI-scaled, so the dot shifted a couple native px at HiDPI. Multiply both by Layout::dpiScale() per the project's hand-drawn-geometry rule. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/windows/console_tab.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/windows/console_tab.cpp b/src/ui/windows/console_tab.cpp index ca8b9b1..f19d70b 100644 --- a/src/ui/windows/console_tab.cpp +++ b/src/ui/windows/console_tab.cpp @@ -611,7 +611,7 @@ void ConsoleTab::drawToolbarStatus(ConsoleCommandExecutor& exec) ImVec2 cp = ImGui::GetCursorScreenPos(); float dotR = schema::UI().drawElement("tabs.console", "status-dot-radius-base").size + schema::UI().drawElement("tabs.console", "status-dot-radius-scale").size * Layout::hScale(); float dotY = cp.y + ImGui::GetTextLineHeight() * 0.5f; - float dotX = cp.x + dotR + 2; + float dotX = cp.x + dotR + 2.0f * Layout::dpiScale(); if (st.pulse) { float a = schema::UI().drawElement("animations", "pulse-base-glow").size + schema::UI().drawElement("animations", "pulse-amp-glow").size * (float)std::sin((double)ImGui::GetTime() * schema::UI().drawElement("animations", "pulse-speed-fast").size); @@ -621,7 +621,7 @@ void ConsoleTab::drawToolbarStatus(ConsoleCommandExecutor& exec) dl->AddCircleFilled(ImVec2(dotX, dotY), dotR, st.color); } - ImGui::Dummy(ImVec2(dotR * 2 + 6, 0)); + ImGui::Dummy(ImVec2(dotR * 2 + 6.0f * Layout::dpiScale(), 0)); ImGui::SameLine(); Type().textColored(TypeStyle::Caption, st.color, st.text.c_str()); } else {