🎥 Make videos programmatically with React
nicer grid
Jonny Burger8cd035271be9
diff --git a/packages/cli/src/editor/components/EditorRuler/Ruler.tsx b/packages/cli/src/editor/components/EditorRuler/Ruler.tsxindex d1b9130c71..a911d668e3 100644--- a/packages/cli/src/editor/components/EditorRuler/Ruler.tsx+++ b/packages/cli/src/editor/components/EditorRuler/Ruler.tsx@@ -7,7 +7,7 @@ import React, {useState,} from 'react';import {Internals} from 'remotion';-import {TIMELINE_BACKGROUND} from '../../helpers/colors';+import {RULER_COLOR, TIMELINE_BACKGROUND} from '../../helpers/colors';import {drawMarkingOnRulerCanvas} from '../../helpers/editor-ruler';import {EditorShowGuidesContext} from '../../state/editor-guides';import {RULER_WIDTH} from '../../state/editor-rulers';@@ -83,6 +83,8 @@ const Ruler: React.FC<RulerProps> = ({height: `${rulerHeight}px`,left: isVerticalRuler ? 0 : 'unset',top: isVerticalRuler ? 'unset' : 0,+ borderBottom: isVerticalRuler ? undefined : '1px solid ' + RULER_COLOR,+ borderRight: isVerticalRuler ? '1px solid ' + RULER_COLOR : undefined,cursor,}),[rulerWidth, rulerHeight, cursor, isVerticalRuler],diff --git a/packages/cli/src/editor/helpers/colors.ts b/packages/cli/src/editor/helpers/colors.tsindex 457f354ae1..67fc517201 100644--- a/packages/cli/src/editor/helpers/colors.ts+++ b/packages/cli/src/editor/helpers/colors.ts@@ -4,6 +4,7 @@ export const BORDER_COLOR = '#000';export const LIGHT_COLOR = '#ddd';export const SELECTED_BACKGROUND = 'hsla(0, 0%, 100%, 0.15)';export const LIGHT_TEXT = '#A6A7A9';+export const RULER_COLOR = '#808080';export const VERY_LIGHT_TEXT = 'rgba(255, 255, 255, 0.3)';const SELECTED_HOVER_BACKGROUND = 'hsla(0, 0%, 100%, 0.25)';export const CLEAR_HOVER = 'rgba(255, 255, 255, 0.06)';diff --git a/packages/cli/src/editor/helpers/editor-ruler.ts b/packages/cli/src/editor/helpers/editor-ruler.tsindex 6f199447a3..b9bcb41cb0 100644--- a/packages/cli/src/editor/helpers/editor-ruler.ts+++ b/packages/cli/src/editor/helpers/editor-ruler.ts@@ -1,4 +1,5 @@import {MINIMUM_VISIBLE_CANVAS_SIZE} from '../state/editor-rulers';+import {RULER_COLOR} from './colors';export const drawMarkingOnRulerCanvas = ({scale,@@ -32,11 +33,11 @@ export const drawMarkingOnRulerCanvas = ({context.clearRect(0, 0, canvasWidth, canvasHeight);- context.strokeStyle = '#dbe3e8';+ context.strokeStyle = RULER_COLOR;context.lineWidth = 1;context.beginPath();points.forEach((point) => {- context.strokeStyle = '#dbe3e8';+ context.strokeStyle = RULER_COLOR;context.lineWidth = 1;const originDistance = point.position + originOffset - startMarking * scale;context.beginPath();@@ -61,18 +62,18 @@ export const drawMarkingOnRulerCanvas = ({context.stroke();context.font = '10px Arial, Helvetica, sans-serif';context.textAlign = 'left';- context.fillStyle = '#dbe3e8';+ context.fillStyle = RULER_COLOR;if (orientation === 'horizontal') {context.fillText(- point.value.toString().split('').join(String.fromCharCode(8202)),+ point.value.toString().split('').join(''),originDistance + 4,16,);} else {context.rotate(-Math.PI / 2);context.fillText(- point.value.toString().split('').join(String.fromCharCode(8202)),+ point.value.toString().split('').join(''),-originDistance + 4,16,);