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

Unified Diff: ui/native_theme/native_theme_base.h

Issue 2009733002: Draw nicer arrows when the scrollbar buttons are not square. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor edits 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: ui/native_theme/native_theme_base.h
diff --git a/ui/native_theme/native_theme_base.h b/ui/native_theme/native_theme_base.h
index 74525ce67fbf4dfcbbc7d2cc3356ae6d797178e2..e92b21d21d1cf94e8e1fee8837615b3957cfc537 100644
--- a/ui/native_theme/native_theme_base.h
+++ b/ui/native_theme/native_theme_base.h
@@ -11,6 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "skia/ext/platform_canvas.h"
+#include "ui/gfx/geometry/rect_f.h"
#include "ui/native_theme/native_theme.h"
namespace gfx {
@@ -172,8 +173,16 @@ class NATIVE_THEME_EXPORT NativeThemeBase : public NativeTheme {
private:
FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, VerticalArrows);
FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, HorizontalArrows);
+ FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, ArrowForNonSquareButton);
+ FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, BoundingRectSquare);
+ FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest,
+ BoundingRectSlightlyRectangular);
+ FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, BoundingRectVeryRectangular);
+ FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest,
+ BoundingRectSnappedToWholePixels);
Peter Kasting 2016/06/10 01:03:23 When there are this many FRIEND_TESTs, consider wh
Bret 2016/06/11 00:11:43 Since I only need PathForArrow and BoundRectForArr
SkPath PathForArrow(const gfx::Rect& rect, Part direction) const;
+ gfx::RectF BoundingRectForArrow(const gfx::Rect& rect) const;
void DrawVertLine(SkCanvas* canvas,
int x,

Powered by Google App Engine
This is Rietveld 408576698