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

Commit

Permalink
fix: auto adjust mini-view height based on frame size
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n committed Oct 9, 2020
1 parent 4b27c4e commit 3229159
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/renderer/components/Timer/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,10 @@ export const actions = {
const { remote } = await import('electron');
const win = remote.getCurrentWindow();
win.setAlwaysOnTop(mini);
const { height } = win.getBounds();
const contentHeight = document.documentElement.offsetHeight;
if (mini) {
if (process.platform !== 'darwin') {
win.setBounds({ height: 80, width: 366 });
} else {
win.setBounds({ height: 63, width: 366 });
}
win.setBounds({ height: height - contentHeight + 43, width: 366 });
} else {
win.setBounds({ height: 800, width: 1080 });
}
Expand Down

0 comments on commit 3229159

Please sign in to comment.