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

Unified Diff: ui/views/controls/focusable_rounded_border_mac.cc

Issue 2920463002: views: remove FocusableRoundedBorderMac (Closed)
Patch Set: Created 3 years, 7 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 | « ui/views/controls/focusable_rounded_border_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/focusable_rounded_border_mac.cc
diff --git a/ui/views/controls/focusable_rounded_border_mac.cc b/ui/views/controls/focusable_rounded_border_mac.cc
deleted file mode 100644
index ba19855a2a9c0c3e19f576dc9f52b179d332f909..0000000000000000000000000000000000000000
--- a/ui/views/controls/focusable_rounded_border_mac.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/views/controls/focusable_rounded_border_mac.h"
-
-#include "ui/gfx/canvas.h"
-#include "ui/native_theme/native_theme_mac.h"
-
-namespace {
-
-const int kThickness = 1;
-
-} // namespace
-
-namespace views {
-
-FocusableRoundedBorder::FocusableRoundedBorder() {
- // TODO(ellyjones): These insets seem like they shouldn't be big enough, but
- // they are, and insetting by corner_radius_ instead produces gargantuan
- // padding. Why is that?
- SetInsets(kThickness, kThickness, kThickness, kThickness);
-}
-
-FocusableRoundedBorder::~FocusableRoundedBorder() {}
-
-// For now, this is similar to RoundedRectBorder::Paint(), but this method will
-// likely diverge in future.
-// TODO(ellyjones): Diverge it by adding soft focus rings.
-void FocusableRoundedBorder::Paint(const View& view, gfx::Canvas* canvas) {
- cc::PaintFlags flags;
- flags.setStyle(cc::PaintFlags::kStroke_Style);
- flags.setStrokeWidth(kThickness);
- flags.setColor(GetCurrentColor(view));
- flags.setAntiAlias(true);
-
- float half_thickness = kThickness / 2.0f;
- gfx::RectF bounds(view.GetLocalBounds());
- bounds.Inset(half_thickness, half_thickness);
- canvas->DrawRoundRect(bounds, ui::NativeThemeMac::kButtonCornerRadius, flags);
-}
-
-} // namespace views
« no previous file with comments | « ui/views/controls/focusable_rounded_border_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698