Add support for requiring a platform-specific stylesheet

Add a getPlatform method to the native object that
is used for requiring the platform stylesheet from
within window.coffee after the atom.css is required.

This is used to provide non-native scrollbars on Linux
for an improved look and feel.
This commit is contained in:
Kevin Sawicki
2012-08-01 15:10:17 -07:00
parent dcd42316aa
commit f778345b3a
5 changed files with 33 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ windowAdditions =
requireStylesheet: (path) ->
fullPath = require.resolve(path)
return unless fs.isFile(fullPath)
window.applyStylesheet(fullPath, fs.read(fullPath))
applyStylesheet: (id, text) ->
@@ -106,3 +107,4 @@ require 'underscore-extensions'
requireStylesheet 'reset.css'
requireStylesheet 'atom.css'
requireStylesheet "#{$native.getPlatform()}.css"