Skip to content

Commit

Permalink
replace timeline button and fix css
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll committed Dec 13, 2024
1 parent f1e8fe3 commit c55f004
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
1 change: 1 addition & 0 deletions theme/image-editor/imageEditor.less
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
border: 2px solid #4067b3;
border-bottom: none;
display: flex;
flex-shrink: 0;
}

.image-editor-header-left,
Expand Down
23 changes: 22 additions & 1 deletion theme/image-editor/timeline.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
flex-direction: column;
}

.image-editor-timeline-frames {
display: flex;
flex-direction: column;
gap: 0.4rem;
padding: 0.4rem 0;
}

.image-editor-timeline-frame {
border: 1px var(--sidebar-icon-inactive-color) solid;
color: var(--sidebar-icon-inactive-color);

border-radius: 0.25rem;
width: 6rem;
height: 6rem;
margin: 0.4rem;
margin: 0 0.4rem;

transition: border 0.2s, color 0.2s, background-color 0.2s;
overflow: hidden;
Expand Down Expand Up @@ -126,6 +133,20 @@
background-color: #aeaeae;
}

.common-button.image-editor-button.add-frame-button {
height: 2rem;
width: 6rem;
margin: 0 0.4rem;

border: 1px solid var(--sidebar-icon-inactive-color);
transition: color 0.1s, border-color 0.1s;

&:hover {
border-color: var(--sidebar-icon-active-color);
filter: none;
}
}

/* .timeline-frame-actions */


Expand Down
10 changes: 7 additions & 3 deletions webapp/src/components/ImageEditor/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { dispatchChangeCurrentFrame, dispatchNewFrame, dispatchDuplicateFrame, d

import { TimelineFrame } from "./TimelineFrame";
import { bindGestureEvents, ClientCoordinates } from "./util";
import { Button } from "../../../../react-common/components/controls/Button";

interface TimelineProps {
colors: string[];
Expand Down Expand Up @@ -81,9 +82,12 @@ export class TimelineImpl extends React.Component<TimelineProps, TimelineState>
deleteFrame={this.deleteFrame} />
</div>
}
<div className="image-editor-timeline-frame collapsed" role="button" onClick={this.newFrame}>
<span className="ms-Icon ms-Icon--Add" />
</div>
<Button
className="image-editor-button add-frame-button toggle"
title={lf("Add new frame")}
onClick={this.newFrame}
leftIcon="ms-Icon ms-Icon--Add"
/>
</div>
</div>
</div>
Expand Down

0 comments on commit c55f004

Please sign in to comment.