Skip to content

Commit

Permalink
feat(main): 修改bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aitexiaoy committed Jul 3, 2019
1 parent 3e5c21b commit fd1f6d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Works on macOS 10.12+, and Windows 10, Windows7.
- 增加下一页请求中提示,增加请求失败提示。
- 增加搜索中文关键词的支持
- 修改Paper的图库处理,对标Paper3.3
- 修复在多显示器纵轴方向拼接时,定位不对问题。

## 用户统计
草莓壁纸会针对用户安装量以及用户的活跃量进行统计,根据用户的网卡信息生成唯一UID。统计信息只获取用户的电脑系统,用户电脑用户名。
Expand Down
9 changes: 8 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,19 @@ function createAppTray() {
winPositionX = Math.max(Math.min(currentScreen.bounds.width + currentScreen.bounds.x - winWidth, cursorPosition.x - (winWidth / 2)), currentScreen.bounds.x)
winPositionY = currentScreen.bounds.height + currentScreen.bounds.y - trayPositionSize - winHeight
} else if (trayPositionType === 'left') {
winPositionX = currentScreen.bounds.x + currentScreen.bounds.width + trayPositionSize
winPositionX = currentScreen.bounds.x + trayPositionSize
winPositionY = Math.max(Math.min(currentScreen.bounds.height + currentScreen.bounds.y - winHeight, cursorPosition.y - (winHeight / 2)), currentScreen.bounds.y)
} else if (trayPositionType === 'right') {
winPositionX = currentScreen.bounds.x + currentScreen.bounds.width - trayPositionSize - winWidth
winPositionY = Math.max(Math.min(currentScreen.bounds.height + currentScreen.bounds.y - winHeight, cursorPosition.y - (winHeight / 2)), currentScreen.bounds.y)
}
log.info('--------------------------------')
log.info('currentScreen:', currentScreen)
log.info('position:', winPositionX, winPositionY)
log.info('trayPositionType:', trayPositionType)
log.info('trayPositionSize', trayPositionSize)
log.info('cursorPosition:', cursorPosition)
log.info('--------------------------------')
win.setPosition(parseInt(winPositionX, 10), winPositionY)
} catch (error) {
log.error(error)
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/page/content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@

<script>
// 在渲染器进程 (网页) 中。
import { log, debuglog, osType } from 'util'
import { mapState, mapActions } from 'vuex'
import { osType } from '../../utils/utils'
import { version } from '../../../package'
import setter from './setter'
import swProgress from './progress'
Expand Down

0 comments on commit fd1f6d1

Please sign in to comment.