Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
fix: optimize mini view in darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n committed Oct 9, 2020
1 parent 24da645 commit 4b27c4e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/common/Mini/MiniLogger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class MiniLogger extends React.Component<Props> {
fontSize="40"
style={{ fill: 'rgb(99,99,99)' }}
>
{isConfirming ? '🍅' : time}
{isConfirming ? (isFocusing ? '🍅' : '') : time}
</text>
</svg>
{this.getButtonRow()}
Expand Down
2 changes: 1 addition & 1 deletion src/main/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const createWindow = async () => {
width: 1080,
height: 800,
minWidth: 380,
minHeight: 80,
minHeight: 63,
frame: true,
icon: nativeImage.createFromPath(path.join(__dirname, logo)),
title: 'Pomodoro Logger',
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Main = styled.div<StyledProps>`
margin: 0;
}
${({ minimize }) => (minimize ? 'overflow: hidden;' : '')}
${({ minimize }) => (minimize ? 'overflow: hidden; height: 100vh;' : '')}
.ant-tabs-nav-container,.ant-modal-content {
${({ minimize }) => (minimize ? 'display: none;' : '')}
}
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/components/Timer/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ export const actions = {
const win = remote.getCurrentWindow();
win.setAlwaysOnTop(mini);
if (mini) {
win.setBounds({ height: 80, width: 366 });
if (process.platform !== 'darwin') {
win.setBounds({ height: 80, width: 366 });
} else {
win.setBounds({ height: 63, width: 366 });
}
} else {
win.setBounds({ height: 800, width: 1080 });
}
Expand Down

0 comments on commit 4b27c4e

Please sign in to comment.