diff --git a/src/app/components/swap-panel-component.js b/src/app/components/swap-panel-component.js index 47c433bbb0..3431fe2cc6 100644 --- a/src/app/components/swap-panel-component.js +++ b/src/app/components/swap-panel-component.js @@ -77,7 +77,7 @@ const css = csjs` } .plugItIn { display : none; - height: calc(100% - 50px); + height : 100%; } .plugItIn > div { overflow-y : auto; @@ -95,8 +95,8 @@ const css = csjs` text-transform: uppercase; } .swapitHeader { - height: 50px; - padding-top: 16px; + height: 35px; + padding-top: 10px; padding-left: 27px; } ` diff --git a/src/app/editor/editor.js b/src/app/editor/editor.js index 797304dfcf..2750ecdd40 100644 --- a/src/app/editor/editor.js +++ b/src/app/editor/editor.js @@ -101,6 +101,35 @@ class Editor { // Unmap ctrl-t & ctrl-f this.editor.commands.bindKeys({ 'ctrl-t': null }) + + // shortcuts for "Ctrl-"" and "Ctrl+"" to increase/decrease font size of the editor + this.editor.commands.addCommand({ + name: 'increasefontsizeEqual', + bindKey: {win: 'Ctrl-=', mac: 'Command-='}, + exec: (editor) => { + this.editorFontSize(1) + }, + readOnly: true + }) + + this.editor.commands.addCommand({ + name: 'increasefontsizePlus', + bindKey: {win: 'Ctrl-+', mac: 'Command-+'}, + exec: (editor) => { + this.editorFontSize(1) + }, + readOnly: true + }) + + this.editor.commands.addCommand({ + name: 'decreasefontsize', + bindKey: {win: 'Ctrl--', mac: 'Command--'}, + exec: (editor) => { + this.editorFontSize(-1) + }, + readOnly: true + }) + this.editor.setShowPrintMargin(false) this.editor.resize(true) @@ -247,7 +276,10 @@ class Editor { * @param {number} incr The amount of pixels to add to the font. */ editorFontSize (incr) { - this.editor.setFontSize(this.editor.getFontSize() + incr) + let newSize = this.editor.getFontSize() + incr + if (newSize >= 6) { + this.editor.setFontSize(newSize) + } } /** diff --git a/src/app/files/styles/file-explorer-styles.js b/src/app/files/styles/file-explorer-styles.js index daff4e19ca..19af1a39d6 100644 --- a/src/app/files/styles/file-explorer-styles.js +++ b/src/app/files/styles/file-explorer-styles.js @@ -19,7 +19,7 @@ var css = csjs` padding : 4px; } .newFile { - padding-right : 5px; + padding-right : 10px; } .newFile i { cursor : pointer; diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js index 0466c2c4a5..58d91cc8fc 100644 --- a/src/app/panels/styles/terminal-styles.js +++ b/src/app/panels/styles/terminal-styles.js @@ -13,7 +13,6 @@ var css = csjs` .bar { display : flex; min-height : 3em; - padding : 2px; z-index : 3; } .menu { @@ -35,7 +34,8 @@ var css = csjs` } .toggleTerminal { margin-right : 20px; - margin-left : 20px; + margin-left : 2px; + margin-top : 2px; font-size : 14px; font-weight : bold; cursor : pointer; @@ -138,7 +138,7 @@ var css = csjs` display : flex; justify-content : center; align-items : center; - font-size : 10px; + font-size : 14px; } .dragbarHorizontal { position : absolute; diff --git a/src/app/panels/tab-proxy.js b/src/app/panels/tab-proxy.js index d83f8be086..23b6f76167 100644 --- a/src/app/panels/tab-proxy.js +++ b/src/app/panels/tab-proxy.js @@ -102,18 +102,12 @@ export class TabProxy { this._view.filetabs.canAdd = false this._view.tabs = yo` -
+
${this._view.filetabs}
` let tabsbar = yo` -
-
- - - - -
+
${this._view.tabs}
` @@ -138,8 +132,6 @@ export class TabProxy { return false }) - function increase () { self.editor.editorFontSize(1) } - function decrease () { self.editor.editorFontSize(-1) } return tabsbar } } diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 741529a23f..808fd912f7 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -120,7 +120,7 @@ class Terminal { ` self._view.icon = yo` ` + class="btn btn-secondary align-items-center ${css.toggleTerminal} fa fa-angle-double-down">` self._view.dragbar = yo`
` self._view.dropdown = self._components.dropdown.render() @@ -143,7 +143,7 @@ class Terminal {
${self._view.dropdown}
- +
@@ -158,7 +158,7 @@ class Terminal { ` self._view.el = yo` -
+
${self._view.bar} ${self._view.term}
diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index 8e3b3790bd..02e7871512 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -82,7 +82,7 @@ export class LandingPage extends ApiFactory { description: ``, payload: () => { this.alert(`-imported from gist-`) } }, - { label: 'Import from gist', + { label: 'Import from Gist', type: `callback`, description: ``, payload: () => {