Skip to content

Commit 91998e8

Browse files
authored
Merge pull request #11 from zonayedpca/v0.10.0-beta
V0.10.0 beta
2 parents 6123ab7 + 25c7697 commit 91998e8

File tree

4 files changed

+51
-17
lines changed

4 files changed

+51
-17
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: node_js
22
matrix:
33
include:
4+
- os: linux
45
- os: osx
56
node_js:
67
- 8

electron-builder.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,29 @@ win:
3535
# Config for the windows installer
3636
nsis:
3737
oneClick: false
38+
39+
# Linux configuration
40+
linux:
41+
icon: 'src/assets/img/icon256x256.png'
42+
target:
43+
- target: 'AppImage'
44+
arch:
45+
- x64
46+
- ia32
47+
- target: 'deb'
48+
arch:
49+
- x64
50+
- ia32
51+
- target: 'rpm'
52+
arch:
53+
- x64
54+
- ia32
55+
- target: 'zip'
56+
arch:
57+
- x64
58+
- ia32
59+
- target: 'tar.gz'
60+
arch:
61+
- x64
62+
- ia32
63+
publish: ['github']

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devtop",
3-
"version": "0.9.0-beta",
3+
"version": "0.10.0-beta",
44
"description": "DevTop - Essential Tools for Developers",
55
"main": "app.js",
66
"author": {

src/utils/getPosition.js

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,29 @@ module.exports = (tray, window) => {
55
const { x, y, height, width } = tray.getBounds();
66
const { height: winHeight, width: winWidth } = window.getBounds();
77
let setX, setY;
8-
if(y < (SIZE_THRESHOLD + (winHeight / 2))) {
9-
// top
10-
setX = x - (winWidth/2 - (width/2));
11-
setY = y + height;
12-
} else if(y > SIZE_THRESHOLD && y > (display.height - SIZE_THRESHOLD)) {
13-
// bottom
14-
setX = x - (winWidth/2 - (width/2));
15-
setY = y - winHeight;
16-
} else if(x < (SIZE_THRESHOLD + winWidth)) {
17-
// left
18-
setX = x + width;
19-
setY = y - (winHeight - height);
8+
if (process.platform !== 'linux') {
9+
if (y < SIZE_THRESHOLD + winHeight / 2) {
10+
// top
11+
setX = x - (winWidth / 2 - width / 2);
12+
setY = y + height;
13+
} else if (y > SIZE_THRESHOLD && y > display.height - SIZE_THRESHOLD) {
14+
// bottom
15+
setX = x - (winWidth / 2 - width / 2);
16+
setY = y - winHeight;
17+
} else if (x < SIZE_THRESHOLD + winWidth) {
18+
// left
19+
setX = x + width;
20+
setY = y - (winHeight - height);
21+
} else {
22+
// right
23+
setX = x - winWidth;
24+
setY = y - (winHeight - height);
25+
}
2026
} else {
21-
// right
22-
setX = x - winWidth;
23-
setY = y - (winHeight - height);
27+
// for linux
28+
setX = display.height + winWidth / 2;
29+
setY = display.y;
2430
}
31+
2532
return { setX, setY };
26-
}
33+
};

0 commit comments

Comments
 (0)