refactor(ui): add material::LabeledInput helper + adopt at 8 form fields
UI-standardization audit: the labeled single-line form field (a plain ImGui::Text label above a fixed-width InputText/InputTextWithHint) was open-coded across dialogs. Add material::LabeledInput(label, id, buf, size, width=-1, hint=nullptr, flags=0) mirroring that idiom exactly — pixel-identical, but a single chokepoint so input styling (label typography, frame, spacing) can later evolve in one place. Returns the input's edited bool. Adopt at the clean vertical (label-above) single-line sites: address-book add/edit (label + address), shield from-address, export-all-keys + export- transactions filename, validate-address input, request-payment label + URI. Left as-is: horizontal label-beside-input rows (settings RPC host/port/user/ pass use Text + SameLine), multiline (InputTextMultiline), numeric (InputDouble), combos, and hint-only inputs — none match the vertical single-line idiom. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -82,9 +82,7 @@ void ExportTransactionsDialog::render(App* app)
|
||||
ImGui::Spacing();
|
||||
|
||||
// Filename
|
||||
ImGui::Text("%s", TR("output_filename"));
|
||||
ImGui::SetNextItemWidth(-1);
|
||||
ImGui::InputText("##Filename", s_filename, sizeof(s_filename));
|
||||
material::LabeledInput(TR("output_filename"), "##Filename", s_filename, sizeof(s_filename));
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::TextDisabled("%s", TR("file_save_location"));
|
||||
|
||||
Reference in New Issue
Block a user