Add ability to have tooltips on buttons

Summary: Enables a basic tooltip when using icon buttons and a convenience method for setting an icon.

Test Plan: Built a UIExample.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12172
This commit is contained in:
Chad Little
2015-03-26 11:09:20 -07:00
parent fe89d67663
commit 4bdc51237a
2 changed files with 28 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ final class PHUIButtonBarExample extends PhabricatorUIExample {
->setTag('a')
->setColor(PHUIButtonView::SIMPLE)
->setTitle($text)
->setTooltip($text)
->setIcon($image);
$button_bar3->addButton($button);