Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: ash/wm/panel_frame_view.cc

Issue 9703034: ash/wm: Use gfx::Canvas::FillRect to draw the separator line instead of relying in DrawLine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter review Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panel_frame_view.cc
diff --git a/ash/wm/panel_frame_view.cc b/ash/wm/panel_frame_view.cc
index 5fe67bc732840d9d3ce5873bb8da57b61f4ba0d7..09d8599e99268eadc154aedb95df1b0c8cf5751a 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698