Skip to content

Commit

Permalink
fix: compact mode layout broke with 120 minutes max timer config (#393)
Browse files Browse the repository at this point in the history
* enhance: hide zero (0) in hours in compact mode

* enhance: decrease compact mode icon size in compact mode

* enhance: decrease timer font size in compact mode

---------

Co-authored-by: = <=>
  • Loading branch information
ziadevcom committed Jun 15, 2023
1 parent a5b147f commit c8c3c66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/renderer/src/routes/Timer/Counter/CounterTimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const CounterTimer: React.FC<Props> = ({
>
{Number(hours) > 0 && (
<>
<span>{hours}</span>
<span>{compact ? hours[hours.length - 1] : hours}</span>
<span>:</span>
</>
)}
Expand Down
4 changes: 4 additions & 0 deletions app/renderer/src/styles/routes/timer/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ export const StyledMainButton = styled.button`
export const StyledCompactButton = styled.button<{ compact?: boolean }>`
${ControlButton}
padding-right: ${(p) => (p.compact ? "1.6rem" : 0)};
& > svg {
width: ${(p) => (p.compact ? "1.6rem" : "inherit")};
}
`;

export const StyledSkipButton = styled.button`
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/src/styles/routes/timer/counter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const StyledCounterTimer = styled.h3<TimerProps>`
}
&.compact {
font-size: ${(p) => (p.fullscreen ? "4rem" : "2.5rem")};
font-size: ${(p) => (p.fullscreen ? "4rem" : "2.3rem")};
width: unset;
display: flex;
gap: 0.25rem;
Expand Down

0 comments on commit c8c3c66

Please sign in to comment.