Skip to content

Commit

Permalink
Live mode UI (#4487)
Browse files Browse the repository at this point in the history
* no canvas color change, thicker border

* dont use stop icon in toolbar

* wip move play mode toast to toolbar submenu

* Revert "wip move play mode toast to toolbar submenu"

This reverts commit 749184b.

* nevermind! same canvas border
  • Loading branch information
lankaukk authored Nov 20, 2023
1 parent 5b17360 commit 4069e6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion editor/src/components/editor/canvas-toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export const CanvasToolbar = React.memo(() => {
<Tooltip title='Live Mode' placement='bottom'>
<InsertModeButton
testid={PlayModeButtonTestId}
iconType={isLiveMode ? 'stop' : 'play'}
iconType={'play'}
iconCategory='tools'
primary={canvasToolbarMode.primary === 'play'}
onClick={toggleLiveMode}
Expand Down
3 changes: 2 additions & 1 deletion editor/src/templates/editor-canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import { emptyModifiers, Modifier } from '../utils/modifiers'
import type { MouseButtonsPressed } from '../utils/mouse'
import RU from '../utils/react-utils'
import Utils from '../utils/utils'
import { UtopiaStyles } from '../uuiui'
import { UtopiaStyles, colorTheme } from '../uuiui'
import { DropHandlers } from './image-drop'
import { EditorCommon } from '../components/editor/editor-component-common'
import { CursorComponent } from '../components/canvas/controls/select-mode/cursor-component'
Expand Down Expand Up @@ -871,6 +871,7 @@ export class EditorCanvas extends React.Component<EditorCanvasProps> {
'data-testid': 'canvas-root',
style: {
...canvasLiveEditingStyle,
backgroundColor: colorTheme.canvasBackground.value,
transition: 'all .2s linear',
position: 'relative',
overflow: 'hidden',
Expand Down
2 changes: 0 additions & 2 deletions editor/src/uuiui/styles/theme/utopia-theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ const flexCenter: React.CSSProperties = {
const canvas = {
live: {
border: `1px solid ${colorTheme.canvasLiveBorder.value}`,
backgroundColor: colorTheme.canvasLiveBackground.value,
},
editing: {
border: '1px solid transparent',
backgroundColor: colorTheme.canvasBackground.value,
},
}

Expand Down

0 comments on commit 4069e6e

Please sign in to comment.