From a2c4a8df734456d762fd1ecb54399313a0d71e4e Mon Sep 17 00:00:00 2001 From: DanS Date: Mon, 13 Jul 2026 22:13:54 -0500 Subject: [PATCH] fix(material): wrap DialogWarningHeader so long warnings don't clip Export All Keys' long DANGER warning was clipped at the card edge because the header rendered a single unwrapped line. Add PushTextWrapPos so a long warning flows to a second line; short one-line warnings (import/backup/settings) fit and are unaffected. Surfaced by the Windows sweep on modal-export-all-keys. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/ui/material/draw_helpers.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/material/draw_helpers.h b/src/ui/material/draw_helpers.h index b65f0c4..eb37dde 100644 --- a/src/ui/material/draw_helpers.h +++ b/src/ui/material/draw_helpers.h @@ -1676,7 +1676,11 @@ inline void DialogWarningHeader(const char* warningLabel, const ImVec4& col = Wa ImGui::SameLine(); // Vertically center the label with the taller warning glyph (stays within the icon's row height). if (iconH > textH) ImGui::SetCursorPosY(rowTop + (iconH - textH) * 0.5f); + // Wrap so a long warning flows to a second line instead of clipping at the card edge; short + // warnings (which fit) are unaffected. + ImGui::PushTextWrapPos(0.0f); ImGui::TextColored(col, "%s", warningLabel); + ImGui::PopTextWrapPos(); } // 50/50 Cancel / confirm footer for overlay dialogs. Sets `outCancel` /