diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 22:36:57 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 22:36:57 +0000 |
commit | dc7501093791f6c85c16d32f09be4038b0623562 (patch) | |
tree | 9d201965dbcf9689281171c5ec9a202bb7c11a31 /ash | |
parent | 1388ccffaf0ca5aa7783c9f267c0d2df2f17b0e5 (diff) | |
download | chromium_src-dc7501093791f6c85c16d32f09be4038b0623562.zip chromium_src-dc7501093791f6c85c16d32f09be4038b0623562.tar.gz chromium_src-dc7501093791f6c85c16d32f09be4038b0623562.tar.bz2 |
ash/wm: Use gfx::Canvas::FillRect to draw the separator line instead of relying in DrawLine.
BUG=100898
R=pkasting@chromium.org,sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9703034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/panel_frame_view.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ash/wm/panel_frame_view.cc b/ash/wm/panel_frame_view.cc index 5fe67bc..09d8599 100644 --- a/ash/wm/panel_frame_view.cc +++ b/ash/wm/panel_frame_view.cc @@ -19,12 +19,15 @@ namespace ash { namespace { + const int kClientViewPaddingLeft = 0; const int kClientViewPaddingRight = 0; const int kClientViewPaddingBottom = 0; +const int kSeparatorWidth = 1; const SkColor kCaptionColor = SK_ColorGRAY; -const SkColor kCaptionIconDivisorColor = SkColorSetARGB(0xFF, 0x55, 0x55, 0x55); -} +const SkColor kCaptionIconSeparatorColor = SkColorSetRGB(0x55, 0x55, 0x55); + +} // namespace // Buttons for panel control class PanelControlButton : public views::CustomButton { @@ -90,11 +93,9 @@ class PanelCaption : public views::View, // Overridden from views::View: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { canvas->FillRect(GetLocalBounds(), kCaptionColor); - gfx::Rect close_button_bounds = close_button_->bounds(); - canvas->DrawLine( - gfx::Point(close_button_bounds.x(), close_button_bounds.y()), - gfx::Point(close_button_bounds.x(), close_button_bounds.bottom()), - kCaptionIconDivisorColor); + gfx::Rect separator(close_button_->bounds()); + separator.set_width(kSeparatorWidth); + canvas->FillRect(separator, kCaptionIconSeparatorColor); } virtual void Layout() OVERRIDE { @@ -182,4 +183,4 @@ gfx::Rect PanelFrameView::GetWindowBoundsForClientBounds( return window_bounds; } -} +} // namespace ash |