mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user