diff --git a/src/fenigma/grid_widget.py b/src/fenigma/grid_widget.py index 8e56187..d270903 100644 --- a/src/fenigma/grid_widget.py +++ b/src/fenigma/grid_widget.py @@ -638,14 +638,24 @@ class GridCanvas(Gtk.DrawingArea): what a proposal is until the user accepts it.""" for p, coord in self._pending_proposals(): color = CATEGORY_COLOR["ally" if p.side == "friendly" else "target"] - # detected_id (map_vision.read_marker_id's best-effort read of - # the marker's own "#" label) shown right on the map while - # the screenshot backing it is still up, so it's checkable - # against the actual pixels -- same id _accept_proposal will - # use for the entity if this gets accepted, see its own comment. - id_part = f" #{p.detected_id}" if p.detected_id else "" + # No coord here: _draw_marker already shows one right below + # this label (`coord=coord` below), repeating it in the main + # label too was pure noise. detected_type/detected_id + # (map_vision.classify_marker/read_marker_id's best-effort + # reads) shown instead when known -- same "? Mechanized#3" + # shape an accepted entity's own name takes (Target.name), + # checkable against the actual screenshot pixels while it's + # still up, and detected_id is the same id _accept_proposal + # will use for the entity if this gets accepted. + detected_type = icons.target_type_from_icon(p.unit) + # .short, not target_type_label(): matches Target.name/Ally.name's + # own naming exactly ("SupplyCache" not "Supply Cache"), so this + # preview label reads the same as what accepting it produces. + type_part = detected_type.short if detected_type else "" + id_part = f"#{p.detected_id}" if p.detected_id else "" + label = f"? {type_part}{id_part}" if (type_part or id_part) else "?" self._draw_marker(cr, view, coord.as_fraction(), color, - f"?{id_part} {coord.label()}", width, height, + label, width, height, hollow=True, coord=coord) def _hit_test(self, view: _View, x: float, y: float):