fix: collab username style fixes (#6668)
This commit is contained in:
parent
ce9acfbc55
commit
74d2fc6406
@ -743,12 +743,7 @@ export const _renderScene = ({
|
|||||||
context.strokeStyle = oc.white;
|
context.strokeStyle = oc.white;
|
||||||
context.stroke();
|
context.stroke();
|
||||||
} else {
|
} else {
|
||||||
// Border
|
roundRect(context, boxX, boxY, boxWidth, boxHeight, 8, oc.white);
|
||||||
context.fillStyle = oc.white;
|
|
||||||
context.fillRect(boxX, boxY, boxWidth, boxHeight);
|
|
||||||
// Background
|
|
||||||
context.fillStyle = background;
|
|
||||||
context.fillRect(offsetX, offsetY, boxWidth - 2, boxHeight - 2);
|
|
||||||
}
|
}
|
||||||
context.fillStyle = oc.black;
|
context.fillStyle = oc.black;
|
||||||
|
|
||||||
@ -759,7 +754,7 @@ export const _renderScene = ({
|
|||||||
paddingVertical +
|
paddingVertical +
|
||||||
measure.actualBoundingBoxAscent +
|
measure.actualBoundingBoxAscent +
|
||||||
Math.floor((finalHeight - measureHeight) / 2) +
|
Math.floor((finalHeight - measureHeight) / 2) +
|
||||||
1,
|
2,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ export const roundRect = (
|
|||||||
width: number,
|
width: number,
|
||||||
height: number,
|
height: number,
|
||||||
radius: number,
|
radius: number,
|
||||||
|
strokeColor?: string,
|
||||||
) => {
|
) => {
|
||||||
context.beginPath();
|
context.beginPath();
|
||||||
context.moveTo(x + radius, y);
|
context.moveTo(x + radius, y);
|
||||||
@ -33,5 +34,8 @@ export const roundRect = (
|
|||||||
context.quadraticCurveTo(x, y, x + radius, y);
|
context.quadraticCurveTo(x, y, x + radius, y);
|
||||||
context.closePath();
|
context.closePath();
|
||||||
context.fill();
|
context.fill();
|
||||||
|
if (strokeColor) {
|
||||||
|
context.strokeStyle = strokeColor;
|
||||||
|
}
|
||||||
context.stroke();
|
context.stroke();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user