@@ -8,7 +8,7 @@ import { GiSoundWaves } from 'react-icons/gi';
88// import useTraceUpdate from 'use-trace-update';
99import invariant from 'tiny-invariant' ;
1010
11- import { primaryTextColor , primaryColor , darkModeTransition } from './colors' ;
11+ import { primaryTextColor , primaryColor , darkModeTransition , dangerColor } from './colors' ;
1212import SegmentCutpointButton from './components/SegmentCutpointButton' ;
1313import SetCutpointButton from './components/SetCutpointButton' ;
1414import ExportButton from './components/ExportButton' ;
@@ -49,17 +49,15 @@ const InvertCutModeButton = memo(({ invertCutSegments, setInvertCutSegments }: {
4949 } , [ setInvertCutSegments , t ] ) ;
5050
5151 return (
52- < div style = { { marginRight : 5 } } >
52+ < div >
5353 < motion . div
54- style = { { width : 24 , height : 24 } }
5554 animate = { { rotateX : invertCutSegments ? 0 : 180 } }
5655 transition = { { duration : 0.3 } }
5756 >
5857 < FaYinYang
59- size = { 24 }
6058 role = "button"
6159 title = { invertCutSegments ? t ( 'Discard selected segments' ) : t ( 'Keep selected segments' ) }
62- style = { { color : invertCutSegments ? primaryTextColor : undefined } }
60+ style = { { display : 'block' , fontSize : '1.5em' , color : invertCutSegments ? primaryTextColor : undefined } }
6361 onClick = { onYinYangClick }
6462 />
6563 </ motion . div >
@@ -383,8 +381,7 @@ function BottomBar({
383381 < >
384382 { hasAudio && (
385383 < GiSoundWaves
386- size = { 24 }
387- style = { { padding : '0 .1em' , color : waveformMode != null ? primaryTextColor : undefined } }
384+ style = { { fontSize : '1.6em' , padding : '0 .1em' , color : waveformMode != null ? primaryTextColor : undefined } }
388385 role = "button"
389386 title = { t ( 'Show waveform' ) }
390387 onClick = { ( ) => toggleWaveformMode ( ) }
@@ -393,14 +390,14 @@ function BottomBar({
393390 { hasVideo && (
394391 < >
395392 < FaImages
396- style = { { fontSize : '1em' , padding : '0 .2em' , color : showThumbnails ? primaryTextColor : undefined } }
393+ style = { { fontSize : '1. 1em' , padding : '0 .2em' , color : showThumbnails ? primaryTextColor : undefined } }
397394 role = "button"
398395 title = { t ( 'Show thumbnails' ) }
399396 onClick = { toggleShowThumbnails }
400397 />
401398
402399 < FaKey
403- style = { { fontSize : '.9em ' , padding : '0 .2em' , color : keyframesEnabled ? primaryTextColor : undefined } }
400+ style = { { fontSize : '1em ' , padding : '0 .2em' , color : keyframesEnabled ? primaryTextColor : undefined } }
404401 role = "button"
405402 title = { t ( 'Show keyframes' ) }
406403 onClick = { toggleShowKeyframes }
@@ -504,69 +501,74 @@ function BottomBar({
504501
505502 < div
506503 className = "no-user-select"
507- style = { { display : 'flex' , alignItems : 'center' , justifyContent : 'space-between' , padding : '3px 4px ' } }
504+ style = { { display : 'flex' , alignItems : 'center' , justifyContent : 'space-between' , padding : '.2em .3em' , gap : '.5em ' } }
508505 >
509506 < InvertCutModeButton invertCutSegments = { invertCutSegments } setInvertCutSegments = { setInvertCutSegments } />
510507
511- < SimpleModeButton style = { { flexShrink : 0 } } />
508+ < div >
509+ < SimpleModeButton style = { { verticalAlign : 'middle' } } />
512510
513- { simpleMode && < div role = "button" onClick = { toggleSimpleMode } style = { { marginLeft : 5 , fontSize : '90%' } } > { t ( 'Toggle advanced view' ) } </ div > }
511+ { simpleMode && (
512+ < span role = "button" onClick = { toggleSimpleMode } style = { { fontSize : '.8em' , marginLeft : '.1em' } } > { t ( 'Toggle advanced view' ) } </ span >
513+ ) }
514+ </ div >
514515
515516 { ! simpleMode && (
516517 < >
517- < div role = "button" style = { { marginRight : 5 , marginLeft : 10 } } title = { t ( 'Zoom' ) } onClick = { timelineToggleComfortZoom } > { Math . floor ( zoom ) } x</ div >
518+ < div role = "button" title = { t ( 'Zoom' ) } onClick = { timelineToggleComfortZoom } > { Math . floor ( zoom ) } x</ div >
518519
519- < Select style = { { height : 20 , flexBasis : 85 , flexGrow : 0 } } value = { zoomOptions . includes ( zoom ) ? zoom . toString ( ) : '' } title = { t ( 'Zoom' ) } onChange = { withBlur ( ( e ) => setZoom ( ( ) => parseInt ( e . target . value , 10 ) ) ) } >
520+ < Select style = { { width : '4.5em' } } value = { zoomOptions . includes ( zoom ) ? zoom . toString ( ) : '' } title = { t ( 'Zoom' ) } onChange = { withBlur ( ( e ) => setZoom ( ( ) => parseInt ( e . target . value , 10 ) ) ) } >
520521 < option key = "" value = "" disabled > { t ( 'Zoom' ) } </ option >
521522 { zoomOptions . map ( ( val ) => (
522523 < option key = { val } value = { String ( val ) } > { t ( 'Zoom' ) } { val } x</ option >
523524 ) ) }
524525 </ Select >
525526
526- { detectedFps != null && (
527- < div title = { t ( 'Video FPS' ) } role = "button" onClick = { handleChangePlaybackRateClick } style = { { color : 'var(--gray-11)' , fontSize : '.7em' , marginLeft : 6 } } > { ( detectedFps * outputPlaybackRate ) . toFixed ( 3 ) } </ div >
528- ) }
527+ < div ref = { playbackRateRef } title = { t ( 'Playback rate' ) } style = { { color : 'var(--gray-11)' , fontSize : '.7em' } } > { playbackRate . toFixed ( 1 ) } </ div >
529528
530- < IoMdSpeedometer title = { t ( 'Change FPS' ) } style = { { padding : '0 .2em' , fontSize : '1.3em' } } role = "button" onClick = { handleChangePlaybackRateClick } />
529+ < div >
530+ < IoMdSpeedometer title = { t ( 'Change FPS' ) } style = { { fontSize : '1.3em' , verticalAlign : 'middle' } } role = "button" onClick = { handleChangePlaybackRateClick } />
531531
532- < div ref = { playbackRateRef } title = { t ( 'Playback rate' ) } style = { { color : 'var(--gray-11)' , fontSize : '.7em' , marginLeft : '.1em' } } > { playbackRate . toFixed ( 1 ) } </ div >
532+ { detectedFps != null && (
533+ < span title = { t ( 'Video FPS' ) } role = "button" onClick = { handleChangePlaybackRateClick } style = { { color : 'var(--gray-11)' , fontSize : '.7em' , marginLeft : '.3em' } } > { ( detectedFps * outputPlaybackRate ) . toFixed ( 3 ) } </ span >
534+ ) }
535+ </ div >
533536 </ >
534537 ) }
535538
536- < div style = { { flexGrow : 1 } } />
537-
538539 { hasVideo && (
539- < >
540- < span style = { { textAlign : 'right' , display : 'inline-block' , fontSize : '.8em' , marginRight : '.3em' } } > { isRotationSet && rotationStr } </ span >
540+ < div onClick = { increaseRotation } role = "button" >
541541 < MdRotate90DegreesCcw
542- style = { { fontSize : '1.2em ' , verticalAlign : 'middle' , color : isRotationSet ? primaryTextColor : undefined } }
542+ style = { { fontSize : '1.3em ' , verticalAlign : 'middle' , color : isRotationSet ? primaryTextColor : undefined } }
543543 title = { `${ t ( 'Set output rotation. Current: ' ) } ${ isRotationSet ? rotationStr : t ( 'Don\'t modify' ) } ` }
544- onClick = { increaseRotation }
545- role = "button"
546544 />
547- </ >
545+ < span style = { { textAlign : 'right' , display : 'inline-block' , fontSize : '.8em' , marginLeft : '.1em' } } > { isRotationSet && rotationStr } </ span >
546+ </ div >
548547 ) }
549548
549+
550+ < div style = { { flexGrow : 1 } } />
551+
550552 { ! simpleMode && isFileOpened && (
551553 < FaTrashAlt
552554 title = { t ( 'Close file and clean up' ) }
553- style = { { padding : '0 .7em ' , fontSize : '1em' } }
555+ style = { { fontSize : '1em ' , color : dangerColor } }
554556 onClick = { cleanupFilesDialog }
555557 role = "button"
556558 />
557559 ) }
558560
559561 { hasVideo && (
560- < >
561- { ! simpleMode && < CaptureFormatButton style = { { width : '3.7em' , textAlign : 'center' } } /> }
562-
562+ < div >
563563 < IoIosCamera
564- style = { { paddingLeft : '.1em' , paddingRight : '.5em' } }
565- size = { 25 }
564+ role = "button"
565+ style = { { fontSize : '1.9em' , verticalAlign : 'middle' } }
566566 title = { t ( 'Capture frame' ) }
567567 onClick = { captureSnapshot }
568568 />
569- </ >
569+
570+ { ! simpleMode && < CaptureFormatButton style = { { width : '3.7em' , textAlign : 'center' , marginLeft : '.1em' } } /> }
571+ </ div >
570572 ) }
571573
572574 { ( ! simpleMode || ! exportConfirmEnabled ) && < ToggleExportConfirm style = { { marginRight : '.5em' } } /> }
0 commit comments