Apply 'scrollbar-style-x' class to WorkspaceView

…where x is 'overlay' or 'legacy' depending on whether the scrollbars
are only visible when scrolling (overlay) or always visible (legacy).

This will allow us to style scrollbars in legacy mode without forcing
them to be visible in overlay mode.
This commit is contained in:
Nathan Sobo
2014-03-03 22:33:28 -07:00
parent 68a8b6d437
commit 0eac9d3e6f
3 changed files with 15 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ path = require 'path'
Q = require 'q'
_ = require 'underscore-plus'
Delegator = require 'delegato'
scrollbarStyle = require 'scrollbar-style'
{$, $$, View} = require './space-pen-extensions'
fs = require 'fs-plus'
Workspace = require './workspace'
@@ -81,6 +82,11 @@ class WorkspaceView extends View
@subscribe @model, 'uri-opened', => @trigger 'uri-opened'
@subscribe scrollbarStyle.onValue (style) =>
@removeClass('scrollbar-style-legacy')
@removeClass('scrollbar-style-overlay')
@addClass("scrollbar-style-#{style}")
@updateTitle()
@on 'focus', (e) => @handleFocus(e)