Split the pool-mode hashrate card into a 25%-width left card + 75% chart so the
Manual/Auto toggle and pool metrics no longer reflow the tab:
- left card: Manual|Auto toggle (with tooltips), a Local/Pool/Shares/Uptime
metric stack, and a fixed-height scrolling pool list — rows click-to-select in
Manual (reusing the existing save+restart path) and show a "mining here" dot in
Auto. Fixed height keeps the card constant as pools are added.
- mode-toggle row: keep the suggested-pools dropdown + auto-mode URL disable;
the toggle and pool list moved into the card.
- mining_controls: show the installed/running miner version ("Current: …")
before and during mining instead of "none".
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
1.3 KiB
C++
29 lines
1.3 KiB
C++
// DragonX Wallet - ImGui Edition
|
|
// Copyright 2024-2026 The Hush Developers
|
|
// Released under the GPLv3
|
|
|
|
#pragma once
|
|
|
|
#include "../../data/wallet_state.h"
|
|
#include "../material/draw_helpers.h" // GlassPanelSpec
|
|
#include "imgui.h"
|
|
|
|
namespace dragonx {
|
|
class App;
|
|
namespace ui {
|
|
|
|
// Renders the mining "Hashrate + Stats" card. In SOLO mode this is a full-width card (stat values
|
|
// on top, hashrate chart or live log below). In POOL mode it splits into a left card (Manual/Auto
|
|
// toggle + pool metric stack + a fixed-height scrolling pool list) and a right region (chart or
|
|
// log) — so toggling Manual/Auto or adding pools never reflows the tab. `poolMode` is the parent's
|
|
// solo/pool toggle; `s_pool_url` / `s_pool_settings_dirty` are the parent's pool-selection buffer
|
|
// and dirty flag (a pool-row click writes them, reusing the parent's save+restart path).
|
|
void RenderMiningStats(const WalletState& state, const MiningInfo& mining,
|
|
ImDrawList* dl, ImFont* capFont, ImFont* sub1, ImFont* ovFont,
|
|
float dp, float vs, float gap, float pad, float availWidth,
|
|
const material::GlassPanelSpec& glassSpec, float chartBudgetH, bool poolMode,
|
|
App* app, char (&s_pool_url)[256], bool& s_pool_settings_dirty);
|
|
|
|
} // namespace ui
|
|
} // namespace dragonx
|