Skip to content

Commit

Permalink
Fix misalignment of markdown-preview icons
Browse files Browse the repository at this point in the history
Fixes #435
References #414
  • Loading branch information
Alhadis committed Oct 14, 2016
1 parent 2cd1a6f commit cf8bf57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).

[Unpublished]
-------------
### Changed
- [[`#437`](https://github.com/DanBrooker/file-icons/issues/437)] Clarified wording of package settings
### Fixed
- [[`#435`](https://github.com/DanBrooker/file-icons/issues/435)] Icon of [`markdown-preview`] misaligned after reloading
- [[`#437`](https://github.com/DanBrooker/file-icons/issues/437)] Ambiguous wording of package settings

[`markdown-preview`]: https://github.com/atom/markdown-preview


[1.7.21] - 2016-10-12
Expand Down
7 changes: 7 additions & 0 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ module.exports =
atom.config.set colouredIcons, !(atom.config.get colouredIcons)

@observe true

# gh-435: Strip path attributes from Markdown-Preview on startup
atom.packages.onDidActivateInitialPackages ->
selector = '.file-icons-tab-pane-icon .tab[data-type="MarkdownPreviewView"]'
tabs = atom.views.getView(atom.workspace).querySelectorAll(selector)
for tab in tabs
tab.itemTitle.removeAttribute "data-path"

atom.config.onDidChange 'file-icons.forceShow', ({newValue, oldValue}) =>
@forceShow newValue
Expand Down

0 comments on commit cf8bf57

Please sign in to comment.