From df8b5d43a51c42fb55af36134d1e6722a079fc91 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 14 Sep 2019 20:28:09 +0100 Subject: [PATCH] Adjust for tools nav options & panes, split icons --- lib/ice-coder.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 50b5429..17488e4 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -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();