feat(mining): label the pool fee inline + widen the auto-balance card
Each pool row showed "<hashrate> N%" with nothing saying the % is the pool fee. Make it "<hashrate> N% fee" and widen the left auto-balance card (25%/180dp -> 30%/210dp min) so the added text fits. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -315,7 +315,7 @@ static void RenderLeftPoolCard(App* app, const WalletState& state, ImDrawList* d
|
|||||||
|
|
||||||
char right[64];
|
char right[64];
|
||||||
std::string hrStr = haveHr ? FormatHashrate(it->second.hashrateHs) : std::string("—");
|
std::string hrStr = haveHr ? FormatHashrate(it->second.hashrateHs) : std::string("—");
|
||||||
snprintf(right, sizeof(right), "%s %.0f%%", hrStr.c_str(), kp.feePercent);
|
snprintf(right, sizeof(right), "%s %.0f%% fee", hrStr.c_str(), kp.feePercent);
|
||||||
ImVec2 rSz = capFont->CalcTextSizeA(capFont->LegacySize, FLT_MAX, 0, right);
|
ImVec2 rSz = capFont->CalcTextSizeA(capFont->LegacySize, FLT_MAX, 0, right);
|
||||||
cdl->AddText(capFont, capFont->LegacySize,
|
cdl->AddText(capFont, capFont->LegacySize,
|
||||||
ImVec2(rMax.x - rSz.x - 6 * dp, textY), OnSurfaceMedium(), right);
|
ImVec2(rMax.x - rSz.x - 6 * dp, textY), OnSurfaceMedium(), right);
|
||||||
@@ -374,7 +374,8 @@ void RenderMiningStats(const WalletState& state, const MiningInfo& mining,
|
|||||||
float cardH = std::max(leftContentH, statRowH + chartBudgetH + pad);
|
float cardH = std::max(leftContentH, statRowH + chartBudgetH + pad);
|
||||||
|
|
||||||
ImVec2 cardMin = ImGui::GetCursorScreenPos();
|
ImVec2 cardMin = ImGui::GetCursorScreenPos();
|
||||||
float leftW = std::clamp(availWidth * 0.25f, 180.0f * dp, availWidth * 0.45f);
|
// A bit wider than the old 25%/180dp so the pool rows fit the "<hashrate> N% fee" text.
|
||||||
|
float leftW = std::clamp(availWidth * 0.30f, 210.0f * dp, availWidth * 0.45f);
|
||||||
float colGap = gap;
|
float colGap = gap;
|
||||||
float rightW = availWidth - leftW - colGap;
|
float rightW = availWidth - leftW - colGap;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user