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

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

Issue 2322653002: Sharpen MdTextButton border for fractional scale factors. (Closed)
Patch Set: always have an opaque bg Created 4 years, 3 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
Index: ui/views/controls/focusable_border.cc
diff --git a/ui/views/controls/focusable_border.cc b/ui/views/controls/focusable_border.cc
index 8aa775dbb782b888becfa9f5a349802b2a606b9c..9795a2fa72a8ba39fb1995948d863ac7ee13c1c6 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -50,8 +50,7 @@ void FocusableBorder::Paint(const View& view, gfx::Canvas* canvas) {
gfx::ScopedCanvas scoped(canvas);
float dsf = canvas->UndoDeviceScaleFactor();
// Scale the rect and snap to pixel boundaries.
- gfx::RectF rect = gfx::RectF(gfx::ToEnclosedRect(
- ScaleRect(gfx::RectF(view.GetLocalBounds()), dsf, dsf)));
+ gfx::RectF rect(gfx::ScaleToEnclosingRect(view.GetLocalBounds(), dsf));
rect.Inset(gfx::InsetsF(0.5f));
SkPath path;
float corner_radius_px = kCornerRadiusDp * dsf;

Powered by Google App Engine
This is Rietveld 408576698