diff --git a/src/main/TrackSelection.tsx b/src/main/TrackSelection.tsx index 878c8fa7e..533ad38e2 100644 --- a/src/main/TrackSelection.tsx +++ b/src/main/TrackSelection.tsx @@ -85,13 +85,21 @@ const TrackItem: React.FC<{track: Track, enabledCount: number}> = ({track, enabl display: 'flex', flexDirection: 'column', alignItems: 'left', - - width: '100%', - maxWidth: '500px', }); + const trackitemSubStyle = css({ + display: 'flex', + flexDirection: 'row', + ...(flexGapReplacementStyle(20, true)), + + justifyContent: 'space-around', + flexWrap: 'wrap', + }) + const playerStyle = css({ aspectRatio: '16 / 9', + width: '100%', + maxWidth: '457px', }); const headerStyle = css({ @@ -103,6 +111,15 @@ const TrackItem: React.FC<{track: Track, enabledCount: number}> = ({track, enabl }, }); + const buttonsStyle = css({ + // TODO: Avoid hard-coding max-width + "@media (max-width: 1550px)": { + width: '100%', + }, + display: 'flex', + flexDirection: 'column', + }) + // What state is the track in and can it be deactivated? // We do not permit deactivating the last remaining track // 2 -> Track is enabled and can be deactivated @@ -131,19 +148,24 @@ const TrackItem: React.FC<{track: Track, enabledCount: number}> = ({track, enabl return (
{ header }
- - +
+ +
+ +
+
); } @@ -163,25 +185,30 @@ const SelectButton : React.FC = ({handler, text, Icon, to const buttonStyle = [ active ? basicButtonStyle(theme) : deactivatedButtonStyle, { - padding: '10px 5px', - width: '30%', + padding: '16px', + maxHeight: '21px', boxShadow: '', - border: `1px solid ${theme.text}`, background: `${theme.element_bg}`, + textWrap: 'nowrap', }]; + const clickHandler = () => { if (active) { handler() } ref.current?.blur(); }; + const keyHandler = (event: React.KeyboardEvent) => { if (active && (event.key === " " || event.key === "Enter")) { handler(); } }; + const ref = React.useRef(null) + return ( -
= ({handler, text, Icon, to onClick={clickHandler} onKeyDown={keyHandler} > -
{ text }
+ { text }
);