Skip to content

Commit

Permalink
Do not highlight timeline segments in thumbnail editor
Browse files Browse the repository at this point in the history
In the thumbnail editor, a timeline similar to the one in the cutting
view is visible. One thing they share is highlighting individual
segments on the timeline. This makes no sense in the thumbnail
editor, as you cannot interact with the segments at all. This fixes
that.

Resolves #834
  • Loading branch information
Arnei authored and lkiesow committed Dec 23, 2022
1 parent 9264089 commit 89f4a54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/Thumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const Thumbnail : React.FC<{}> = () => {
/>
<Timeline
timelineHeight={125}
styleByActiveSegment={false}
selectIsPlaying={selectIsPlaying}
selectCurrentlyAt={selectCurrentlyAt}
setIsPlaying={setIsPlaying}
Expand Down
8 changes: 5 additions & 3 deletions src/main/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ import { ThemedTooltip } from './Tooltip';
*/
const Timeline: React.FC<{
timelineHeight?: number,
styleByActiveSegment?: boolean,
selectCurrentlyAt: (state: RootState) => number,
selectIsPlaying:(state: RootState) => boolean,
setClickTriggered: ActionCreatorWithPayload<any, string>,
setCurrentlyAt: ActionCreatorWithPayload<number, string>,
setIsPlaying: ActionCreatorWithPayload<boolean, string>,
}> = ({
timelineHeight = 250,
styleByActiveSegment = true,
selectCurrentlyAt,
selectIsPlaying,
setClickTriggered,
Expand Down Expand Up @@ -81,7 +83,7 @@ const Timeline: React.FC<{
/>
<div css={{position: 'relative', height: timelineHeight - 20 + 'px'}} >
<Waveforms timelineHeight={timelineHeight}/>
<SegmentsList timelineWidth={width} timelineHeight={timelineHeight} styleByActiveSegment={true} tabable={true}/>
<SegmentsList timelineWidth={width} timelineHeight={timelineHeight} styleByActiveSegment={styleByActiveSegment} tabable={true}/>
</div>
</div>
);
Expand Down Expand Up @@ -283,8 +285,8 @@ export const Scrubber: React.FC<{
export const SegmentsList: React.FC<{
timelineWidth: number,
timelineHeight: number,
styleByActiveSegment: boolean,
tabable: boolean,
styleByActiveSegment?: boolean,
tabable?: boolean,
}> = ({
timelineWidth,
timelineHeight,
Expand Down

0 comments on commit 89f4a54

Please sign in to comment.