fix for windows & linux

This commit is contained in:
life
2015-03-12 15:34:05 +08:00
parent 67dfd94730
commit 5527cd6d47
17 changed files with 758 additions and 587 deletions

View File

@@ -1370,7 +1370,11 @@ var ContextTips = {
function switchAccount() {
SyncService.stop();
location.href = 'login.html';
// location.href = 'login.html';
var w = gui.Window.open('login.html', {frame: false, toolbar: false, resizable: false, transparent: true, width: 258, max_width: 258});
// w.focus();
// gui.Window.close();
win.close();
}
function commonCmd(e) {
@@ -1398,6 +1402,31 @@ function loadToolIcons() {
}
}
function isMac() {
return process.platform == 'darwin';
}
function getMainWinParams() {
if(isMac()) {
return {
frame: false,
transparent: true,
width: 258,
height: 326,
toolbar: false,
"chromium-args": "--enable-smooth-scrolling"
};
}
return {
frame: true,
transparent: false,
width: 1100,
height: 600,
toolbar: false,
"chromium-args": "--enable-smooth-scrolling"
};
}
// loadToolIcons();
ContextTips.init();