Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit fea29fb

Browse files
committed
Ab text fix
1 parent 6cf1ad6 commit fea29fb

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

src/view/components/cpx/CpxImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const initSvgStyle = (svgElement: HTMLElement, brightness: number): void => {
155155

156156
const ab = outerBtn(165, SvgStyle.MB_HEIGHT - 15, "A+B");
157157
const abtext = svg.child(ab.outer, "text", {
158-
class: "sim-text",
158+
class: "sim-text-outside",
159159
x: SvgStyle.BUTTON_TEXT_BASELINE,
160160
y: SvgStyle.MB_HEIGHT - 18,
161161
}) as SVGTextElement;

src/view/components/cpx/Cpx_svg_style.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ export const SVG_STYLE = `
141141
fill:#fff;
142142
pointer-events: none; user-select: none;
143143
}
144+
.sim-text-outside{
145+
font-size:8px;
146+
fill: var(--vscode-textLink-activeForeground);
147+
}
144148
.sim-text.small {
145149
font-size:6px;
146150
}

src/view/components/microbit/Microbit_svg.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,7 @@ export class MicrobitSvg extends React.Component {
17701770
fill="#111"
17711771
style={{ fill: "rgb(17, 17, 17)" }}
17721772
/>
1773-
<text x={525} y={340} className="sim-text">
1773+
<text x={525} y={340} className="sim-text-outside">
17741774
A+B
17751775
</text>
17761776
<g

src/view/styles/Microbit.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ svg.sim.grayscale {
2222
.sim-button:active {
2323
fill: orange;
2424
}
25-
25+
.sim-text-outside {
26+
font-size: 25px;
27+
fill: var(--vscode-textLink-activeForeground);
28+
}
2629
.sim-board,
2730
.sim-display,
2831
sim-button {

0 commit comments

Comments
 (0)