fix(ui): cut-off/clipping — recent-tx collisions, updater note wrap, request-payment URI, console filter, icon-grid scroll
Fixes the cut-off/clipping bugs from the layout audit (all visible at the default
1280/1024 window sizes):
- Receive "Recent Received" rows: the amount collided with the relative-time
("+15.7500 DRGX14 days ago") and the type label touched the address at narrow
widths. Use the shared short time format (formatTimeAgoShort, matching Overview),
chain the amount's right edge off the measured time width, and start the address
after the measured type-label width — so neither pair can collide.
- Daemon & xmrig updater verify-note: drawn unwrapped and clipped at the card's right
edge; wrap it (PushTextWrapPos) within the already-reserved height.
- Request Payment: the three footer buttons shared one fixed width (clipping "Copy
Full Address"); size each to its own label. The Payment URI overflowed a plain
field; render it in a bordered read-only box (bounded, un-chunked).
- Console: the filter input shrank below its own placeholder (gone entirely at 1024);
give it a min width >= the placeholder and drop the "N lines" count when the row
can't fit both.
- Address-label "Choose Icon" grid: had NoScrollbar hiding most of the catalog with
no cue; give it a real scrollbar.
- Overview "Recent Transactions": drop the 4th row at 1024 (it clipped off-screen) by
capping to rows that fully fit the reserved height.
- Sidebar: reserve the unread-badge width in the nav-label centering so History/Chat
labels no longer collide with their badge.
Verified at 1024 and 1280 across full-node + Lite + Windows (ctest green) and an
adversarial diff review (clean). Skipped the legacy settings_window overlay footer
(dead code / removal candidate).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -564,12 +564,27 @@ void ConsoleTab::renderToolbar(ConsoleCommandExecutor& exec)
|
||||
ImGui::SameLine();
|
||||
}
|
||||
|
||||
// Line count
|
||||
ImGui::TextDisabled(TR("console_line_count"), model_.size());
|
||||
// Line count — the least-critical trailing element. When the row is too narrow to fit the
|
||||
// filter box (at its placeholder-sized minimum) AND its trailing controls, drop the line count
|
||||
// rather than starve/hide the filter (worst at 1024px). Mirror the reservation formula in
|
||||
// drawFilterInput(): trailing = 4 frame-height buttons + the group spacers, and the filter's
|
||||
// hard floor = its placeholder width + frame padding.
|
||||
{
|
||||
char lineCountBuf[64];
|
||||
snprintf(lineCountBuf, sizeof(lineCountBuf), TR("console_line_count"), model_.size());
|
||||
float lineCountW = ImGui::CalcTextSize(lineCountBuf).x + Layout::spacingSm() * 2.0f; // text + its trailing spacer
|
||||
float trailingW = ImGui::GetFrameHeight() * 4.0f + Layout::spacingSm() * 7.0f;
|
||||
float filterMinW = ImGui::CalcTextSize(TR("console_filter_hint")).x
|
||||
+ ImGui::GetStyle().FramePadding.x * 2.0f + 8.0f * Layout::dpiScale();
|
||||
bool showLineCount = ImGui::GetContentRegionAvail().x >= lineCountW + trailingW + filterMinW;
|
||||
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
if (showLineCount) {
|
||||
ImGui::TextDisabled(TR("console_line_count"), model_.size());
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
}
|
||||
}
|
||||
|
||||
// Output filter input
|
||||
drawFilterInput();
|
||||
@@ -695,6 +710,13 @@ void ConsoleTab::drawFilterInput()
|
||||
float filterAvail = ImGui::GetContentRegionAvail().x - trailingBtnSpace;
|
||||
float filterMaxW = schema::UI().drawElement("tabs.console", "filter-max-width").size * Layout::dpiScale();
|
||||
float filterW = std::min(filterMaxW, filterAvail * schema::UI().drawElement("tabs.console", "filter-width-ratio").size);
|
||||
// Never shrink below the placeholder — otherwise the hint clips to "Filter outp" (or the box
|
||||
// vanishes) at narrow widths. Floor = placeholder text + frame padding + a little breathing room.
|
||||
// (drawToolbar() drops the "NNN lines" count when even this floor won't fit alongside the row's
|
||||
// trailing controls, so this max() doesn't push the zoom/color buttons off-window.)
|
||||
float filterMinW = ImGui::CalcTextSize(TR("console_filter_hint")).x
|
||||
+ ImGui::GetStyle().FramePadding.x * 2.0f + 8.0f * Layout::dpiScale();
|
||||
filterW = std::max(filterMinW, filterW);
|
||||
ImGui::SetNextItemWidth(filterW);
|
||||
ImGui::InputTextWithHint("##ConsoleFilter", TR("console_filter_hint"), filter_text_, sizeof(filter_text_));
|
||||
if (filter_text_[0] != '\0') {
|
||||
|
||||
Reference in New Issue
Block a user