Adjust for tools nav options & panes, split icons

This commit is contained in:
Matt Pass
2019-09-14 20:28:09 +01:00
committed by GitHub
parent e1b9788325
commit df8b5d43a5

View File

@@ -167,18 +167,18 @@ var ICEcoder = {
// Set our layout according to the browser size
setLayout: function(dontSetEditor) {
var winW, winH, headerH, fileNavH, tabsBarH, findBarH;
var winW, winH, headerH, fileNavH, tabsBarH, findBarH, toolsBarH;
// Determin width & height available
winW = window.innerWidth;
winH = window.innerHeight;
// Apply sizes to various elements of the page
headerH = 25, fileNavH = 35, tabsBarH = 21, findBarH = 28;
headerH = 25, fileNavH = 35, tabsBarH = 21, findBarH = 28, toolsBarH = 30;
this.header.style.width = this.tabsBar.style.width = this.findBar.style.width = winW + "px";
this.files.style.width = this.editor.style.left = this.filesW + "px";
this.optionsFile.style.width = this.optionsEdit.style.width = this.optionsSource.style.width = this.optionsHelp.style.width = (this.filesW-60) + "px";
this.filesFrame.style.height = (winH-headerH-fileNavH) + "px";
this.filesFrame.style.height = (winH-headerH-fileNavH-toolsBarH) + "px";
this.nestValid.style.left = (this.filesW+10) + "px";
this.versionsDisplay.style.left = (this.filesW+25) + "px";
this.splitPaneControls.style.left = (parseInt((winW-this.filesW)/2,10)-25-4+this.filesW) - 100 + "px";
@@ -190,8 +190,14 @@ var ICEcoder = {
if (!dontSetEditor) {
this.editor.style.width = ICEcoder.content.style.width = (winW-this.filesW) - 200 + "px";
ICEcoder.terminal.style.width = (winW-this.filesW) + "px";
ICEcoder.output.style.width = (winW-this.filesW) + "px";
ICEcoder.database.style.width = (winW-this.filesW) + "px";
ICEcoder.git.style.width = (winW-this.filesW) + "px";
ICEcoder.content.style.height = (winH-headerH-tabsBarH-findBarH-26) + "px";
ICEcoder.terminal.style.height = winH + "px";
ICEcoder.output.style.height = winH + "px";
ICEcoder.database.style.height = winH + "px";
ICEcoder.git.style.height = winH + "px";
// Resize the CodeMirror instances to match the window size
setTimeout(function(){
@@ -223,8 +229,8 @@ var ICEcoder = {
var cM, cMdiff;
top.ICEcoder.splitPane = onOff == "on" ? true : false;
top.get('splitPaneControlsOff').style.opacity = top.ICEcoder.splitPane ? 0.5 : 1;
top.get('splitPaneControlsOn').style.opacity = top.ICEcoder.splitPane ? 1 : 0.5;
top.get('splitPaneControlsOff').style.opacity = top.ICEcoder.splitPane ? 0.2 : 0.5;
top.get('splitPaneControlsOn').style.opacity = top.ICEcoder.splitPane ? 0.5 : 0.2;
top.get('splitPaneNamesMain').style.opacity = top.get('splitPaneNamesDiff').style.opacity = top.ICEcoder.splitPane ? 1 : 0;
top.ICEcoder.setLayout();