Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align items to the end #110

Merged
merged 2 commits into from
Feb 21, 2016
Merged

Align items to the end #110

merged 2 commits into from
Feb 21, 2016

Conversation

jerone
Copy link
Contributor

@jerone jerone commented Feb 8, 2016

This is a WIP draft to align tool-bar items (button & spacer) to the end of the tool-bar. On the horizontal to the right, on the vertical to the bottom. Items can be aligned to the end by using a negative value of the priority property.

Tries to fix #93

tool-bar-btn-right

Am not sure if this is the way to go or use addLeftTile & addRightTile like the status-bar package. Need to do some more thinking and testing.

Code used for testing:

    @toolBar.addButton
      icon: 'arrow-circle-o-right'
      callback: 'application:new-file'
      iconset: 'fa'
      priority: -50
    @toolBar.addButton
      icon: 'folder'
      callback: 'application:open-file'
      iconset: 'ion'
      priority: -51
    @toolBar.addSpacer
      priority: -52
    @toolBar.addButton
      icon: 'archive'
      callback: 'core:save'
      iconset: 'ion'
      priority: -53

@jerone
Copy link
Contributor Author

jerone commented Feb 20, 2016

I've been running this for a while now and it works great.

Anyone wanna give this a try /cc @suda @cakecatz

@cakecatz
Copy link
Collaborator

LGTM 👍

jerone added a commit that referenced this pull request Feb 21, 2016
@jerone jerone merged commit 4bd776c into atom-community:master Feb 21, 2016
@jerone jerone deleted the features/93-tile-align-end branch February 21, 2016 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add buttons to the end of the tool bar
2 participants