Skip to content

Commit

Permalink
Fixes windows bugs with UI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrux committed Nov 7, 2018
1 parent 2b513a3 commit e62eca3
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 377 deletions.
11 changes: 7 additions & 4 deletions app/keymaps/decorators.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ function decorateObject(base, key) {

export function getDecoratedKeymaps() {
const baseKeymaps = getKeymaps();
// Ensure that all keys are in an array and don't use deprecated key combination`
const decoratedKeymaps = mapKeys(decorateObject(baseKeymaps, 'decorateKeymaps'));
console.warn("decoratedKeymaps",decoratedKeymaps);
return decoratedKeymaps;
console.log(baseKeymaps);
if (baseKeymaps) {
// Ensure that all keys are in an array and don't use deprecated key combination`
const decoratedKeymaps = mapKeys(decorateObject(baseKeymaps, 'decorateKeymaps'));
console.warn("decoratedKeymaps",decoratedKeymaps);
return decoratedKeymaps;
}
};
32 changes: 16 additions & 16 deletions app/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { startScanner } from './background/network-scanner';
import { startZmq } from './background/zmq';
import { autoUpdater } from "electron-updater";
const createRPC = require('./rpc');
const contextMenuTemplate = require('./contextmenu');
// const contextMenuTemplate = require('./contextmenu');
const AppMenu = require('./menus/menu');
// import icon from '../resources/icons/96x96.png';
import * as settings from './settings';
Expand All @@ -28,7 +28,7 @@ const chalk = require('chalk');
const prefix = chalk.bold.blue;
const bgTaskColor = chalk.white;

app.appMenuTemplate = AppMenu.createMenu();
// app.appMenuTemplate = AppMenu.createMenu();
app.setName("Workbench");

function writeLog(...params) {
Expand Down Expand Up @@ -130,22 +130,22 @@ app.on('ready', async () => {
// await installExtensions();
// }
const makeMenu = () => {
const menu = AppMenu.createMenu(app.createWindow);
// const menu = AppMenu.createMenu(app.createWindow);

// If we're on Mac make a Dock Menu
if (process.platform === 'darwin') {
const dockMenu = Menu.buildFromTemplate([
{
label: 'New Window',
click() {
app.createWindow();
}
}
]);
app.dock.setMenu(dockMenu);
}
// // If we're on Mac make a Dock Menu
// if (process.platform === 'darwin') {
// const dockMenu = Menu.buildFromTemplate([
// {
// label: 'New Window',
// click() {
// app.createWindow();
// }
// }
// ]);
// app.dock.setMenu(dockMenu);
// }

Menu.setApplicationMenu(AppMenu.buildMenu(menu));
// Menu.setApplicationMenu(AppMenu.buildMenu(menu));
};
// const newIcon = nativeImage.createFromDataURL(icon);
mainWindow = new BrowserWindow({
Expand Down
1 change: 1 addition & 0 deletions app/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import open from './settings/open';

export function setup() {
let currentSettings = settings.getAll();
console.log(currentSettings);
settings.setAll({
eonSshKeyPath: "",
config: {
Expand Down
4 changes: 2 additions & 2 deletions app/styles/left-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
width:$left-bar-width;
left:0;
top:0;
-webkit-app-region: drag;
// -webkit-app-region: drag;
height: calc(100% - #{$top-bar-height});
background-color: $base-color;
background-color: $dark-color;
z-index:1;
position:relative;
.nav {
Expand Down
5 changes: 5 additions & 0 deletions app/styles/top-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
text-align: center;
user-select: none;
-webkit-app-region: drag;

.title {
font-size:12px;
margin: 0 auto;
}
}
16 changes: 8 additions & 8 deletions app/styles/windows-top-bar.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#electron-app-title-bar {
height: 28px;
height: 30px;
background: $base-color;
// border-bottom: 1px solid #000;
-webkit-app-region: drag;
Expand Down Expand Up @@ -33,9 +33,9 @@

/*icon*/
#electron-app-title-bar img.icon {
height: 16px;
width: 16px;
margin: 6px;
height: 18px;
width: 18px;
margin: 6px 10px;
}

/*toolbar button*/
Expand Down Expand Up @@ -137,7 +137,7 @@

#electron-app-title-bar .toolbar-button > button .description {
color: #959da5;
font-size: 11px;
font-size: 12px;
position: relative;
}

Expand Down Expand Up @@ -170,7 +170,7 @@
padding: 0 10px;
border: 1px solid #e1e4e8;
height: 25px;
color: $base-color;
color: $light-color;
background-color: #fafbfc;
border-radius: 2px;
}
Expand Down Expand Up @@ -223,7 +223,7 @@
}

#electron-app-title-bar .toolbar-dropdown.open > .toolbar-button > button {
color: rgba(#FFF,0.5);
color: rgba(#FFF,0.8);
background-color: lighten($base-color,3);
border-color: #fff;
}
Expand All @@ -237,7 +237,7 @@
}

#electron-app-title-bar .toolbar-dropdown:not(.open) .menu-item .menu-label {
opacity: 0.6;
opacity: 1;
}

/*menubar*/
Expand Down
Loading

0 comments on commit e62eca3

Please sign in to comment.