Skip to content

Commit

Permalink
Change text mode colors (#4301)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint authored Oct 3, 2023
1 parent 2465cfa commit ef557ee
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const TextEditableControl = React.memo((props: TextEditableControlProps)
const colorTheme = useColorTheme()
const outlineWidth = 1.5 / props.scale
const outlineColor = colorTheme.textEditableOutline.value
const backgroundColor = colorTheme.textEditableFill.value

if (isZeroSizedElement(props.frame)) {
return null
Expand All @@ -29,7 +28,6 @@ export const TextEditableControl = React.memo((props: TextEditableControlProps)
width: props.frame.width,
height: props.frame.height,
boxShadow: `0px 0px 0px ${outlineWidth}px ${outlineColor}`,
background: backgroundColor,
pointerEvents: 'none',
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion editor/src/components/text-editor/text-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ const TextEditor = React.memo((props: TextEditorProps) => {
)

const colorTheme = useColorTheme()
const outlineWidth = 1.5 / scale
const outlineWidth = 1 / scale
const outlineColor = colorTheme.textEditableOutline.value

const [firstTextProp] = React.useState(text)
Expand Down
3 changes: 1 addition & 2 deletions editor/src/uuiui/styles/theme/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ const darkTheme: typeof light = {
canvasComponentButtonFocused: createUtopiColor('rgba(255,239,230,1)'),
inspectorControlledBackground: createUtopiColor('rgba(242,248,255,1)'),

textEditableFill: createUtopiColor('rgba(255,128,255,.07)'),
textEditableOutline: createUtopiColor('rgba(255,128,255,1)'),
textEditableOutline: darkBase.primary,

// interface elements: buttons, segment controls, checkboxes etc

Expand Down
3 changes: 1 addition & 2 deletions editor/src/uuiui/styles/theme/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ const lightTheme = {
canvasComponentButtonFocused: createUtopiColor('rgba(255,239,230,1)'),
inspectorControlledBackground: createUtopiColor('rgba(242,248,255,1)'),

textEditableFill: createUtopiColor('rgba(255,128,255,.07)'),
textEditableOutline: createUtopiColor('rgba(255,128,255,1)'),
textEditableOutline: lightBase.primary,

// interface elements: buttons, segment controls, checkboxes etc

Expand Down

0 comments on commit ef557ee

Please sign in to comment.