fix(ui): overview/mining polish + default-pool cleanup
- balance: inset the address-row favorite (star) button by the card's inner padding so it mirrors the left margin instead of hugging the card edge. - mining: remove pool.dragonx.cc from the built-in default pools (pool.dragonx.is is now the sole default); update the pool-registry test accordingly. - mining: middle-truncate saved pool-URL and payout-address dropdown rows (new shared material::TruncateToWidth helper) so a full z-address no longer runs under the trailing delete (X) button. - mining: fix the thread-grid cells overflowing the card at >100% display scaling — the reserved Mine-button width used a raw clamp that didn't scale; scale it by dp so cols is estimated correctly (no-op at 100%). Full-node build + test suite green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,10 @@ void RenderMiningControls(App* app, const WalletState& state, const MiningInfo&
|
||||
|
||||
// --- Compute thread grid layout based on controls card width ---
|
||||
// Estimate controlsW first to compute cols correctly
|
||||
float estControlsW = availWidth - std::min(schema::UI().drawElement("tabs.mining", "button-max-width-clamp").size, miningBtnMaxW) - miningBtnGap;
|
||||
// The Mine button is square (= card height, which scales with DPI), so the width we
|
||||
// reserve for it here must scale too — a RAW clamp under-reserves at >100% scaling, which
|
||||
// over-estimates the grid width and lets the thread cells overflow the card (e.g. at 150%).
|
||||
float estControlsW = availWidth - std::min(schema::UI().drawElement("tabs.mining", "button-max-width-clamp").size * dp, miningBtnMaxW) - miningBtnGap;
|
||||
float innerW = estControlsW - pad * 2;
|
||||
float cellSz = std::clamp(schema::UI().drawElement("tabs.mining", "cell-size").size * vs, schema::UI().drawElement("tabs.mining", "cell-min-size").size, schema::UI().drawElement("tabs.mining", "cell-max-size").sizeOr(42.0f));
|
||||
float cellGap = std::max(schema::UI().drawElement("tabs.mining", "cell-gap-min").size, cellSz * schema::UI().drawElement("tabs.mining", "cell-gap-ratio").size);
|
||||
|
||||
Reference in New Issue
Block a user