-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #458 from charlielee/ui-top-bar
Remove sidebar tabs and add title toolbar
- Loading branch information
Showing
11 changed files
with
99 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
src/renderer/components/animator/StatusToolbar/StatusToolbar.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.status-toolbar { | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/renderer/components/animator/TitleToolbar/TitleToolbar.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.title-toolbar { | ||
background-color: var(--ba-black); | ||
} |
51 changes: 51 additions & 0 deletions
51
src/renderer/components/animator/TitleToolbar/TitleToolbar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { PageRoute } from "../../../../common/PageRoute"; | ||
import { Take } from "../../../../common/project/Take"; | ||
import { zeroPad } from "../../../../common/utils"; | ||
import { getTrackLength } from "../../../services/project/projectCalculator"; | ||
import Button from "../../common/Button/Button"; | ||
import { ButtonColor } from "../../common/Button/ButtonColor"; | ||
import IconName from "../../common/Icon/IconName"; | ||
import IconButton from "../../common/IconButton/IconButton"; | ||
import Toolbar from "../../common/Toolbar/Toolbar"; | ||
import ToolbarItem, { ToolbarItemAlign } from "../../common/ToolbarItem/ToolbarItem"; | ||
import "./TitleToolbar.css"; | ||
|
||
interface TitleToolbarProps { | ||
take: Take; | ||
} | ||
|
||
const TitleToolbar = ({ take }: TitleToolbarProps): JSX.Element => { | ||
const makeTakeTitle = (take: Take) => | ||
`Shot ${zeroPad(take.shotNumber, 3)} Take ${zeroPad(take.takeNumber, 2)}`; | ||
|
||
return ( | ||
<Toolbar className="title-toolbar"> | ||
<ToolbarItem stretch align={ToolbarItemAlign.LEFT}> | ||
<Button | ||
label={makeTakeTitle(take)} | ||
title="Manage project" | ||
onClick={PageRoute.STARTUP_MODAL} | ||
color={ButtonColor.TRANSPARENT} | ||
/> | ||
</ToolbarItem> | ||
<ToolbarItem align={ToolbarItemAlign.CENTER}>Untitled Project </ToolbarItem> | ||
<ToolbarItem stretch align={ToolbarItemAlign.RIGHT}> | ||
<IconButton | ||
title="Render current take as a video file" | ||
onClick={PageRoute.EXPORT_VIDEO_MODAL} | ||
icon={IconName.VIDEO} | ||
disabled={getTrackLength(take.frameTrack) === 0} | ||
color={ButtonColor.TRANSPARENT} | ||
/> | ||
<IconButton | ||
title="Preferences" | ||
onClick={PageRoute.PREFERENCES_MODAL} | ||
icon={IconName.SETTINGS} | ||
color={ButtonColor.TRANSPARENT} | ||
/> | ||
</ToolbarItem> | ||
</Toolbar> | ||
); | ||
}; | ||
|
||
export default TitleToolbar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.toolbar-item { | ||
display: flex; | ||
column-gap: var(--margin-050); | ||
} | ||
|
||
.toolbar-item--stretch { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters