Skip to content

Commit

Permalink
hide application menu
Browse files Browse the repository at this point in the history
  • Loading branch information
enfp-dev-studio committed Mar 13, 2023
1 parent ae57868 commit 93cfa40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 7 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const createSettingWindow = () => {
devTools: is.dev,
preload: join(__dirname, '../preload/index.js'), // Preload.js 에서 필요한 모듈들을 미리 로드해서 사용한다 (리모트 모듈 사용 위해서)
sandbox: false
},
}
})
}

Expand Down Expand Up @@ -241,7 +241,7 @@ function initialize() {
// mainWindow?.loadURL('file://' + __dirname + '/foreground.html');

mainWindow?.on('ready-to-show', () => {
mainWindow?.setAlwaysOnTop(true, 'screen-saver');
mainWindow?.setAlwaysOnTop(true, 'screen-saver')
mainWindow?.show()
})

Expand Down Expand Up @@ -445,6 +445,11 @@ function initialize() {
tray.on('click', () => {
tray?.popUpContextMenu()
})

const template: any = [{ role: 'appMenu', submenu: [{ role: 'quit' }] }]

const menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(menu)
}

app.on('before-quit', () => {
Expand Down
7 changes: 1 addition & 6 deletions src/renderer/src/jotai/Animation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ export const getFPS = (percentage: number) => {
} else if (percentage < -32) {
val = -32
}
const result = 100 - Math.abs(Math.ceil(Math.log2(Math.abs(val)))) * 16
console.log(percentage, result)
return result
// if (val === 0) return 100;
// else if (val < 0) return 100 - Math.abs(Math.ceil(percentage)) * 3;
// else return 100 - Math.ceil(val) * 3;
return 100 - Math.abs(Math.ceil(Math.log2(Math.abs(val)))) * 16
}

export const getSpritesheet = (percentage: number) => {
Expand Down

0 comments on commit 93cfa40

Please sign in to comment.