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) <noreply@anthropic.com>
This commit is contained in:
2026-07-13 22:13:54 -05:00
parent 822891d4ef
commit a2c4a8df73

View File

@@ -1676,7 +1676,11 @@ inline void DialogWarningHeader(const char* warningLabel, const ImVec4& col = Wa
ImGui::SameLine(); ImGui::SameLine();
// Vertically center the label with the taller warning glyph (stays within the icon's row height). // 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); 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::TextColored(col, "%s", warningLabel);
ImGui::PopTextWrapPos();
} }
// 50/50 Cancel / confirm footer for overlay dialogs. Sets `outCancel` / // 50/50 Cancel / confirm footer for overlay dialogs. Sets `outCancel` /