diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-05 00:51:58 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-05 00:51:58 +0000 |
commit | bd76fc2bcef23c62e570bdb67d782f4811a5f92d (patch) | |
tree | 0ece71dd45e5abe72bce4ecc9f12c1055238b3a2 /chrome/browser/notifications/balloon_collection.cc | |
parent | 103c215374c596425c599483053f69805720da71 (diff) | |
download | chromium_src-bd76fc2bcef23c62e570bdb67d782f4811a5f92d.zip chromium_src-bd76fc2bcef23c62e570bdb67d782f4811a5f92d.tar.gz chromium_src-bd76fc2bcef23c62e570bdb67d782f4811a5f92d.tar.bz2 |
Spruce up the notification UI to much more closely match the mocks, including a new stylesheet from Glen for text+icon notifications, and little icons for the buttons.
Part of the CL includes new features for TextButton class to control icon placement and appearance on hover.
BUG=none
TEST=notifications
Review URL: http://codereview.chromium.org/450045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/balloon_collection.cc')
-rw-r--r-- | chrome/browser/notifications/balloon_collection.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/notifications/balloon_collection.cc b/chrome/browser/notifications/balloon_collection.cc index b0d2ea6..194ebdd 100644 --- a/chrome/browser/notifications/balloon_collection.cc +++ b/chrome/browser/notifications/balloon_collection.cc @@ -18,6 +18,10 @@ const double kPercentBalloonFillFactor = 0.7; // Allow at least this number of balloons on the screen. const int kMinAllowedBalloonCount = 2; +// Margin from the edge of the work area +const int kVerticalEdgeMargin = 5; +const int kHorizontalEdgeMargin = 5; + } // namespace // static @@ -127,20 +131,20 @@ gfx::Point BalloonCollectionImpl::Layout::GetLayoutOrigin() const { int y = 0; switch (placement_) { case HORIZONTALLY_FROM_BOTTOM_LEFT: - x = work_area_.x(); - y = work_area_.bottom(); + x = work_area_.x() + kHorizontalEdgeMargin; + y = work_area_.bottom() - kVerticalEdgeMargin; break; case HORIZONTALLY_FROM_BOTTOM_RIGHT: - x = work_area_.right(); - y = work_area_.bottom(); + x = work_area_.right() - kHorizontalEdgeMargin; + y = work_area_.bottom() - kVerticalEdgeMargin; break; case VERTICALLY_FROM_TOP_RIGHT: - x = work_area_.right(); - y = work_area_.y(); + x = work_area_.right() - kHorizontalEdgeMargin; + y = work_area_.y() + kVerticalEdgeMargin; break; case VERTICALLY_FROM_BOTTOM_RIGHT: - x = work_area_.right(); - y = work_area_.bottom(); + x = work_area_.right() - kHorizontalEdgeMargin; + y = work_area_.bottom() - kVerticalEdgeMargin; break; default: NOTREACHED(); |