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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_separator_view.cc

Issue 11418229: alternate ntp: implement right-aligned search token (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed nits from peter Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/location_bar/location_bar_separator_view.h"
6
7 #include "base/logging.h"
8 #include "ui/gfx/canvas.h"
9
10 LocationBarSeparatorView::LocationBarSeparatorView()
11 : separator_color_(SK_ColorBLACK) {
12 }
13
14 LocationBarSeparatorView::~LocationBarSeparatorView() {
15 }
16
17 gfx::Size LocationBarSeparatorView::GetPreferredSize() {
18 // Height doesn't matter.
19 return gfx::Size(1, 0);
20 }
21
22 void LocationBarSeparatorView::OnPaint(gfx::Canvas* canvas) {
23 // Note that views::Border::CreateSolidSidedBorder is not used because it
24 // paints a 2-px thick border in retina display, whereas we want a 1-px thick
25 // vertical line in both regular and retina displays.
26 SkPaint paint;
27 paint.setAntiAlias(false);
28 paint.setStrokeWidth(0);
29 paint.setColor(separator_color_);
30 canvas->DrawLine(gfx::Point(0, 0), gfx::Point(0, height()), paint);
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698