ui: per-icon tooltip repositioning + Zcash units/expected (round 18 #4a/#6/#7)
build-test-release / release (push) Successful in 6m41s
build-test-release / release (push) Successful in 6m41s
- #4a Health-column tooltips now reposition per icon: the query-tooltip handler scopes GTK's tip area to the hovered icon's slot, so moving across icons hides the old tooltip and shows a fresh one at the new position (was stuck in place). - #6 Plain Antminer Z15 firmware omits the expected hashrate (the Z15j reports it), so it's filled from the model nameplate (420 KSol/s) -- the actual/expected column + colour now work for Z15 like every other miner. - #7 Equihash hashrate now shows correct units: Sol/s (not TH/s). The stored value is Sol/s/1e12, so ths*1e12 recovers the Sol/s count; the per-board tooltip and the hashrate KPI card now label Equihash as Sol/s with an SI prefix. Unit tests (equihash_hashrate_units) + health tests pass; SELFTEST PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
This commit is contained in:
@@ -983,6 +983,17 @@ static gboolean dvlc_query_tooltip(GtkWidget* tv, gint x, gint y, gboolean keybo
|
||||
if (slot >= (int)iit->second.size()) slot = (int)iit->second.size() - 1;
|
||||
const wxString& tip = iit->second[(size_t)slot];
|
||||
if (tip.IsEmpty()) return FALSE;
|
||||
// Scope the tooltip's "tip area" to just this icon's slot (round 18 #4a).
|
||||
// Without a tip area GTK defaults it to the whole widget, so it never re-queries
|
||||
// or moves the tooltip as the pointer crosses from one icon to the next -- the
|
||||
// old tooltip just stays put with stale text. Setting a per-slot area makes GTK
|
||||
// hide + re-show + reposition the tooltip for each icon.
|
||||
GdkRectangle area;
|
||||
area.x = crect.x + slot * adv;
|
||||
area.y = crect.y;
|
||||
area.width = adv;
|
||||
area.height = crect.height;
|
||||
gtk_tooltip_set_tip_area(tooltip, &area);
|
||||
gtk_tooltip_set_text(tooltip, tip.utf8_str());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user