refactor(settings): import dialog layout polish
Several layout refinements to the Import Private/Viewing Key dialog: - Widen the dialog to 640px so the one-line warning under the heading no longer wraps. - Vertically center DialogWarningHeader's label with the (taller) warning icon instead of top-aligning it — a consistent fix for every warning header. - Add a small gap between the key input's text and the flush eye toggle. - Center + slightly enlarge the Paste / Clear buttons. - Center the Import/Sweep + Close action buttons. - Scan-height control: put the numeric input first with the slider below it, and drop the redundant "0 = rescan from the start" hint (0 is the field default; the transparent-key note is kept). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1666,10 +1666,16 @@ inline void BeginOverlayDialogFooter(float totalActionWidth, bool drawSeparator
|
||||
// TextColored(label). The label text is passed in (already translated).
|
||||
inline void DialogWarningHeader(const char* warningLabel, const ImVec4& col = WarningVec4())
|
||||
{
|
||||
ImGui::PushFont(Type().iconLarge());
|
||||
ImFont* iconF = Type().iconLarge();
|
||||
const float rowTop = ImGui::GetCursorPosY();
|
||||
const float iconH = iconF->LegacySize; // already dp-scaled
|
||||
const float textH = ImGui::GetFontSize();
|
||||
ImGui::PushFont(iconF);
|
||||
ImGui::TextColored(col, ICON_MD_WARNING);
|
||||
ImGui::PopFont();
|
||||
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);
|
||||
ImGui::TextColored(col, "%s", warningLabel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user