Commit 89f158bb by PLN (Algolia)

midiviz: the wordmark spans D1-D3 — one cell made it a chip, three is the banner

parent 4ae02979
......@@ -1858,22 +1858,23 @@ def build_widget(port_label: str, reader: "Reader | None", scale: float = 1.0,
for y in range(img.height()))
def _paint_word(self, p):
"""PARVAGUES inside the D1 cell, with the cell's own margin —
PLN, 2026-09-24: "appears stuck to left wall, should fit in d1
cell so have same margin as cell". The span is the cell's inner
rectangle, not three columns."""
span_w, span_h = max(20.0, self.cw - self.inset), max(8.0, self.ch - self.inset)
"""PARVAGUES over D1-D3 at the cells' own margin — the span is
three columns' inner rectangle (PLN: "should fit in d1-d3 not
just d1 its gtoo tiny atm" — one cell made the type a chip; three
is the banner)."""
span_w = max(20.0, 3 * self.cw - self.inset)
span_h = max(8.0, self.ch - self.inset)
pm = self._word_pixmap(span_w, span_h)
if pm is None:
return
row_y = self.my + 3 * self.ch # PHYSICAL_ORDER index of D
p.setOpacity(WORD_ALPHA)
try:
# clamped to the cell's outer rect: at the smallest windows
# clamped to the span's outer rect: at the smallest windows
# the glow ring can reach 1px past the inner margin, and a
# 1px lean beats 1px of overlap
p.drawPixmap(max(round(self.mx),
round(self.mx + (self.cw - pm.width()) / 2.0)),
round(self.mx + (span_w - pm.width()) / 2.0)),
round(row_y + (self.ch - pm.height()) / 2.0), pm)
finally:
p.setOpacity(1.0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment