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

Unified Diff: ui/views/painter.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/painter.cc
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index 5993c92527df14f79c60e35a4b1568b619bf3738..8d4fc45aa28fc232919e09836fc5a3b92b81fc78 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -65,8 +65,7 @@ void SolidRoundRectPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
gfx::ScopedCanvas scoped_canvas(canvas);
const float scale = canvas->UndoDeviceScaleFactor();
- gfx::RectF border_rect_f((gfx::SizeF(size)));
- border_rect_f.Scale(scale);
+ gfx::RectF border_rect_f(gfx::ScaleToEnclosingRect(gfx::Rect(size), scale));
const SkScalar scaled_corner_radius = SkFloatToScalar(radius_ * scale);
SkPaint paint;
« ui/views/controls/button/md_text_button.cc ('K') | « ui/views/controls/focusable_border.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698