fix(settings): keep "Open data folder" on the data-dir row
The right-aligned Open-data-folder button captured its Y from GetCursorScreenPos() after the wallet-size text, by which point ImGui had already advanced to the next line — so the button dropped below the data-dir row. Capture the row's top Y before rendering the row and pin the button to it, so Data Dir / Wallet Size / Open data folder sit on one line. Full-node build clean; hygiene clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2038,6 +2038,7 @@ void RenderSettingsPage(App* app) {
|
||||
ImVec4 linkHoverCol = linkCol;
|
||||
linkHoverCol.w = std::min(1.0f, linkCol.w + 0.2f);
|
||||
|
||||
float rowTopY = ImGui::GetCursorScreenPos().y; // top of the data-dir row
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::TextUnformatted(TR("settings_data_dir"));
|
||||
ImGui::SameLine(0, Layout::spacingXs());
|
||||
@@ -2083,8 +2084,9 @@ void RenderSettingsPage(App* app) {
|
||||
else
|
||||
ImGui::TextDisabled("%s", TR("settings_not_found"));
|
||||
|
||||
// Open-data-folder button: right-aligned when there is room, else trailing.
|
||||
float rowY = ImGui::GetCursorScreenPos().y;
|
||||
// Open-data-folder button: right-aligned when there is room, else trailing —
|
||||
// kept on the data-dir row (rowTopY), not the next line.
|
||||
float rowY = rowTopY;
|
||||
float rightEdge = sectionOrigin.x + contentW;
|
||||
float actualOpenW = ImGui::CalcTextSize(TR("settings_open_data_dir")).x +
|
||||
ImGui::GetStyle().FramePadding.x * 2.0f;
|
||||
|
||||
Reference in New Issue
Block a user