From 4d5d2689e58afa86ba3d578cda1096dd3cb0e7ca Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 19 Jun 2021 19:25:41 +0200 Subject: on screen controls selection --- components/icons.tsx | 24 ++++++++++++++++++++++ pages/editor.tsx | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++- styles/editor.css | 53 ++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 131 insertions(+), 2 deletions(-) diff --git a/components/icons.tsx b/components/icons.tsx index cf60f54..cd0d0ff 100644 --- a/components/icons.tsx +++ b/components/icons.tsx @@ -197,3 +197,27 @@ export function SlideKeyframeOutline(props: { }[props.type]} ; } + +export function FullScreenControlsRoundedIcon() { + return + + + + ; +} + +export function MenuBarControlsRoundedIcon() { + return + + ; +} diff --git a/pages/editor.tsx b/pages/editor.tsx index 0ab0307..6273dc6 100644 --- a/pages/editor.tsx +++ b/pages/editor.tsx @@ -4,7 +4,12 @@ import { animated, useSpring } from 'react-spring'; import { useDrag } from 'react-use-gesture'; import create from 'zustand'; -import { PressureIcon, SlideKeyframe } from '../components/icons'; +import { + FullScreenControlsRoundedIcon, + MenuBarControlsRoundedIcon, + PressureIcon, + SlideKeyframe, +} from '../components/icons'; import PlaySkipIconAni from '../components/play-skip'; import Selection from '../components/selection'; import { anySlide, loopBeginSlide, loopSlide, slide, slideTypes, toolToSlide } from '../timeline'; @@ -13,6 +18,10 @@ import { TimedVideoPlayer } from './present'; import AppBar from '@material-ui/core/AppBar'; import Button from '@material-ui/core/Button'; import Fab from '@material-ui/core/Fab'; +import FormControl from '@material-ui/core/FormControl'; +import InputLabel from '@material-ui/core/InputLabel'; +import MenuItem from '@material-ui/core/MenuItem'; +import Select from '@material-ui/core/Select'; import Slider from '@material-ui/core/Slider'; import Switch from '@material-ui/core/Switch'; import Toolbar from '@material-ui/core/Toolbar'; @@ -22,6 +31,7 @@ import ToggleButton from '@material-ui/lab/ToggleButton'; import ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup'; import Icon from '@mdi/react'; +import ArrowDropDownRoundedIcon from '@material-ui/icons/ArrowDropDownRounded'; import FullscreenRoundedIcon from '@material-ui/icons/FullscreenRounded'; import NavigateBeforeRoundedIcon from '@material-ui/icons/NavigateBeforeRounded'; import NavigateNextRoundedIcon from '@material-ui/icons/NavigateNextRounded'; @@ -629,6 +639,50 @@ function DefaultSettings() { Allow remote control during presentation + + On-screen controls + +
Cool temporary buttons diff --git a/styles/editor.css b/styles/editor.css index 7c7bd86..23c132e 100644 --- a/styles/editor.css +++ b/styles/editor.css @@ -51,7 +51,6 @@ margin-right: -8px; } .settings .inner button { - width: 100%; background-color: var(--piss); color: var(--bg); } @@ -60,6 +59,10 @@ font-weight: 500; } +.settings .inner button, +.settings .inner .MuiFormControl-root +{ width: 100%; } + .MuiSwitch-root .MuiSwitch-thumb { color: var(--c700); } .MuiSwitch-root .MuiSwitch-track { background-color: var(--c700); } .MuiSwitch-root .Mui-checked .MuiSwitch-thumb { color: var(--gruble); } @@ -67,6 +70,54 @@ .MuiSwitch-root .Mui-checked { color: var(--gruble) !important; } .MuiSwitch-root .Mui-checked:hover { background-color: rgba(93, 233, 174, 0.04) !important; } +.MuiFormControl-root { + border-radius: 4px; + overflow: hidden; +} +.MuiSelect-icon, +.MuiFormLabel-root +{ color: var(--c800) !important; } +.MuiFormLabel-root.Mui-focused { color: var(--gruble) !important; } +.MuiFilledInput-root { + background-color: var(--c300) !important; + color: var(--fg) !important; +} +.MuiFilledInput-underline:after { border-color: var(--gruble) !important; } +.MuiFilledInput-underline:before { border-bottom: none !important; } + +.MuiMenu-paper { + background-color: var(--c200) !important; + color: var(--fg) !important; +} +.MuiListItem-root.Mui-selected, .MuiListItem-root.Mui-selected:hover { background-color: transparent !important; } + +.os-controls-type { width: 192px; } +.os-controls-type svg { + fill: var(--piss); + width: 48px; + height: 48px; +} +.os-controls-type .description { + overflow: hidden; + line-height: 1.1; +} +.os-controls-type .description .title { + font-weight: 700; + margin-bottom: 4px; + font-size: 1.125rem; +} + +.os-controls-type .description .title, +.os-controls-type .description .body { + display: block; + white-space: normal !important; +} + +.os-controls-type .icon { + width: 48px; + padding-right: 4px; +} + .settings ::-webkit-scrollbar-track, .settings ::-webkit-scrollbar-track-piece, .settings ::-webkit-scrollbar { -- cgit v1.2.3