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

Unified Diff: chrome/browser/ui/views/location_bar/background_with_1_px_border.cc

Issue 2066303003: Adjust BackgroundWith1PxBorder corner radius to scale properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move add inside cast Created 4 years, 6 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: chrome/browser/ui/views/location_bar/background_with_1_px_border.cc
diff --git a/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc b/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc
index 8fdff449e6d6c5117867a4e62034544fdcedd03f..c0cb9fb6780953c44a4086255ccb40e1094df71d 100644
--- a/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc
+++ b/chrome/browser/ui/views/location_bar/background_with_1_px_border.cc
@@ -13,9 +13,6 @@
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
-// static
-const float BackgroundWith1PxBorder::kCornerRadius = 2.5f;
-
BackgroundWith1PxBorder::BackgroundWith1PxBorder(SkColor background,
SkColor border)
: border_color_(border) {
@@ -34,7 +31,8 @@ void BackgroundWith1PxBorder::Paint(gfx::Canvas* canvas,
border_rect_f.Inset(inset, inset);
SkPath path;
- const SkScalar scaled_corner_radius = SkFloatToScalar(kCornerRadius * scale);
+ const SkScalar scaled_corner_radius =
+ SkFloatToScalar(kCornerRadius * scale + 0.5f);
path.addRoundRect(gfx::RectFToSkRect(border_rect_f), scaled_corner_radius,
scaled_corner_radius);

Powered by Google App Engine
This is Rietveld 408576698