Skip to content

Commit

Permalink
useGutter option
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 3, 2020
1 parent 48cd604 commit a93d2b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tool-bar-view.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const {CompositeDisposable, Emitter} = require('atom');
const rafDebounce = require('./raf-debounce');

const {useGutter} = require('./tool-bar.js')

module.exports = class ToolBarView {
constructor () {
this.element = document.createElement('div');
Expand Down Expand Up @@ -171,6 +173,8 @@ module.exports = class ToolBarView {
}

drawGutter () {
if (!useGutter) {return;}

this.element.classList.remove('gutter-top', 'gutter-bottom');

const visibleHeight = this.element.offsetHeight;
Expand Down
11 changes: 11 additions & 0 deletions lib/tool-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ const TouchBarManager = require('./touch-bar-manager');
let toolBarView = null;
let touchBarManager = null;

let useGutter = null;
exports.useGutter = useGutter;

exports.activate = function () {
toolBarView = new ToolBarView();
touchBarManager = new TouchBarManager();
useGutter = atom.config.get('toolbar.useGutter')
};

exports.deactivate = function () {
Expand Down Expand Up @@ -50,5 +54,12 @@ exports.config = {
type: 'boolean',
default: true,
order: 5
},
useGutter: {
title: 'Use Gutter Shadow',
description: 'The gutter shadow indicates that some icons are hidden and scrolling is needed. This is off by default (slows down the loading of Tool-bar).',
type: 'boolean',
default: false,
order: 6
}
};

0 comments on commit a93d2b5

Please sign in to comment.