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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 1826653002: Draw infobar arrow border with width of 1px on any scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also deal with bottom separator Created 4 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
Index: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index b0012dc05b02af4bc2c6072ce4d2f8a461c50246..ff4a7cf84d25f663c9cf705287c2ff927a7cc6c3 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -200,9 +200,6 @@ void InfoBarView::Layout() {
stroke_path_.rLineTo(arrow_fill_half_width, arrow_fill_height);
Peter Kasting 2016/03/22 23:39:18 I don't think this code is technically correct in
fill_path_ = stroke_path_;
- // Move the top of the fill path up to the top of the separator and then
- // extend it down all the way through.
- fill_path_.offset(0, -separator_height * SK_ScalarHalf);
// This 0.01 hack prevents the fill from filling more pixels on the right
// edge of the arrow than on the left.
Peter Kasting 2016/03/22 23:39:18 Now that I know more about Skia than when I wrote
const SkScalar epsilon = 0.01f;
@@ -213,10 +210,8 @@ void InfoBarView::Layout() {
}
}
if (bar_height()) {
- fill_path_.addRect(
- 0.0, SkIntToScalar(arrow_height()), SkIntToScalar(width()),
- SkIntToScalar(
- height() - InfoBarContainerDelegate::kSeparatorLineHeight));
+ fill_path_.addRect(0.0, SkIntToScalar(arrow_height()),
+ SkIntToScalar(width()), SkIntToScalar(height()));
}
child_container_->SetBounds(

Powered by Google App Engine
This is Rietveld 408576698