From bd76fc2bcef23c62e570bdb67d782f4811a5f92d Mon Sep 17 00:00:00 2001 From: "johnnyg@chromium.org" Date: Sat, 5 Dec 2009 00:51:58 +0000 Subject: 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 --- chrome/browser/notifications/balloon_collection.cc | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'chrome/browser/notifications/balloon_collection.cc') 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(); -- cgit v1.1