Make the viewport label size one setting
Scene labels used `small` (11 px), the Texture tab used `body` (13 px). Both now read `Theme.viewportLabelSize` through two tokens that differ only in colour. Dropping the per-frame `label.style.fill` assignment matters: textStyle() returns shared cached instances, so with both views on one token it would have recoloured the scene labels too. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0b34bdd990
commit
6bedc948be
3 files changed
+19
-4
No files matched your search
@@ -436,13 +436,12 @@ export class TextureCanvas extends Widget {
|
||||
return;
|
||||
}
|
||||
if (!label) {
|
||||
label = new Text({ style: textStyle('body') });
|
||||
label = new Text({ style: textStyle('viewportLabel') });
|
||||
this.labels.set(frame.id, label);
|
||||
this.labelLayer.addChild(label);
|
||||
}
|
||||
label.visible = true;
|
||||
if (label.text !== frame.name) label.text = frame.name;
|
||||
label.style.fill = Theme.colors.text;
|
||||
const x = at.x + LABEL_INSET;
|
||||
const y = at.y + LABEL_INSET;
|
||||
label.position.set(x + LABEL_PAD, y + LABEL_PAD);
|
||||
|
||||
Reference in new issue
Block a user