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

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

Issue 2314983003: Harmony - manually draw combobox arrows. (Closed)
Patch Set: silence windows complaint 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 2274b3cdcd4d22ae40bd419cef4ad0869ebc9217..8aa775dbb782b888becfa9f5a349802b2a606b9c 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -49,8 +49,9 @@ void FocusableBorder::Paint(const View& view, gfx::Canvas* canvas) {
if (ui::MaterialDesignController::IsSecondaryUiMaterial()) {
gfx::ScopedCanvas scoped(canvas);
float dsf = canvas->UndoDeviceScaleFactor();
- gfx::RectF rect((gfx::Rect(view.GetLocalBounds())));
- rect = ScaleRect(rect, dsf, dsf);
+ // Scale the rect and snap to pixel boundaries.
+ gfx::RectF rect = gfx::RectF(gfx::ToEnclosedRect(
+ ScaleRect(gfx::RectF(view.GetLocalBounds()), dsf, dsf)));
rect.Inset(gfx::InsetsF(0.5f));
SkPath path;
float corner_radius_px = kCornerRadiusDp * dsf;
« ui/views/controls/combobox/combobox.cc ('K') | « ui/views/controls/combobox/combobox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698