Skip to content

Commit 1218b52

Browse files
committedMar 14, 2025·
wip: split background on VO
1 parent 3357e7a commit 1218b52

File tree

3 files changed

+13
-59
lines changed

3 files changed

+13
-59
lines changed
 

‎packages/webui/src/client/ui/ClockView/ClockViewPieceIcons/ClockViewPieceIcons.scss

+6-10
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ $letter-spacing: 0.02em;
3838
}
3939

4040
.live-speak {
41-
fill: url(#background-gradient);
42-
}
41+
--vt-color-light: color-mix(in srgb, var(--segment-layer-background-#{'vt'}) 90%, white);
42+
--camera-color-light: color-mix(in srgb, var(--segment-layer-background-#{'camera'}) 90%, white);
4343

44-
// Gradient styles for live-speak
45-
#background-gradient {
46-
.stop1 {
47-
stop-color: #954c4c;
48-
}
49-
.stop2 {
50-
stop-color: #4c954c;
51-
}
44+
background-image: linear-gradient(to bottom, var(--vt-color-light) 50%, var(--camera-color-light) 50%);
45+
display: flex;
46+
justify-content: center;
47+
align-items: center;
5248
}
5349

5450
// Split view specific styles
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,12 @@
11
export function RemoteSpeakInputIcon({ abbreviation }: { abbreviation?: string }): JSX.Element {
22
return (
3-
<svg className="piece_icon" version="1.1" viewBox="0 0 126.5 89" xmlns="http://www.w3.org/2000/svg">
3+
<div className="clock-view-piece-icon">
44
<rect width="126.5" height="89" className="remote-speak" />
55
<linearGradient id="background-gradient" gradientTransform="rotate(90)">
66
<stop className="stop1" offset={0.5} />
77
<stop className="stop2" offset={0.5} />
88
</linearGradient>
9-
<text
10-
x="5"
11-
y="66.514"
12-
textLength="116.5"
13-
style={{
14-
fill: '#ffffff',
15-
fontFamily: 'open-sans',
16-
fontSize: '40px',
17-
letterSpacing: '0px',
18-
lineHeight: '1.25',
19-
wordSpacing: '0px',
20-
textShadow: '0 2px 9px rgba(0, 0, 0, 0.5)',
21-
}}
22-
xmlSpace="preserve"
23-
>
24-
<tspan
25-
x="5"
26-
y="66.514"
27-
style={{ fill: '#ffffff', fontFamily: 'Roboto', fontSize: '62px', fontWeight: 100 }}
28-
className="label"
29-
>
30-
{abbreviation !== undefined ? abbreviation : 'RSK'}
31-
</tspan>
32-
</text>
33-
</svg>
9+
<span className="remote-speak">{abbreviation !== undefined ? abbreviation : 'RSK'}</span>
10+
</div>
3411
)
3512
}

‎packages/webui/src/client/ui/ClockView/ClockViewPieceIcons/ClockViewRenderers/SplitInputIcon.tsx

+4-23
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default class SplitInputIcon extends React.Component<{
2121
return (
2222
<React.Fragment>
2323
{label && label[1] ? label[1].substr(0, 1).toUpperCase() + ' ' : ''}
24-
<tspan style={{ fontFamily: 'Roboto', fontWeight: 'normal' }}>{label ? label[2] : ''}</tspan>
24+
<span className="camera">{label ? label[2] : ''}</span>
2525
</React.Fragment>
2626
)
2727
} else {
@@ -53,35 +53,16 @@ export default class SplitInputIcon extends React.Component<{
5353

5454
render(): JSX.Element {
5555
return (
56-
<svg
57-
className="clock-view-piece-icon"
58-
version="1.1"
59-
viewBox="0 0 126.5 89"
60-
xmlns="http://www.w3.org/2000/svg"
61-
preserveAspectRatio="none"
62-
>
56+
<div className="clock-view-piece-icon">
6357
<rect width="126.5" height="44.5" className={classNames('upper', this.getLeftSourceType(this.props.piece))} />
6458
<rect
6559
width="126.5"
6660
height="44.5"
6761
y="44.5"
6862
className={classNames('lower', this.getRightSourceType(this.props.piece))}
6963
/>
70-
{!this.props.hideLabel && (
71-
<text
72-
x="63.25"
73-
y="71.513954"
74-
textAnchor="middle"
75-
textLength="126.5"
76-
className="piece-icon-text"
77-
xmlSpace="preserve"
78-
>
79-
<tspan lengthAdjust="spacing" className="label">
80-
{this.getCameraLabel(this.props.piece)}
81-
</tspan>
82-
</text>
83-
)}
84-
</svg>
64+
{!this.props.hideLabel && <span className="piece-icon-text">{this.getCameraLabel(this.props.piece)}</span>}
65+
</div>
8566
)
8667
}
8768
}

0 commit comments

Comments
 (0)
Please sign in to comment.