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

Side by Side 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: no floats allowed 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 unified diff | Download patch
« no previous file with comments | « ui/native_theme/native_theme_aura_unittest.cc ('k') | ui/native_theme/native_theme_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_BASE_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_BASE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Paints the arrow used on the scrollbar and spinner. 163 // Paints the arrow used on the scrollbar and spinner.
164 void PaintArrow(SkCanvas* canvas, 164 void PaintArrow(SkCanvas* canvas,
165 const gfx::Rect& rect, 165 const gfx::Rect& rect,
166 Part direction, 166 Part direction,
167 SkColor color) const; 167 SkColor color) const;
168 168
169 // Returns the color used to draw the arrow. 169 // Returns the color used to draw the arrow.
170 SkColor GetArrowColor(State state) const; 170 SkColor GetArrowColor(State state) const;
171 171
172 private: 172 private:
173 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, VerticalArrows); 173 friend class NativeThemeAuraTest;
174 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, HorizontalArrows);
175 174
176 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const; 175 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const;
176 gfx::Rect BoundingRectForArrow(const gfx::Rect& rect) const;
177 177
178 void DrawVertLine(SkCanvas* canvas, 178 void DrawVertLine(SkCanvas* canvas,
179 int x, 179 int x,
180 int y1, 180 int y1,
181 int y2, 181 int y2,
182 const SkPaint& paint) const; 182 const SkPaint& paint) const;
183 void DrawHorizLine(SkCanvas* canvas, 183 void DrawHorizLine(SkCanvas* canvas,
184 int x1, 184 int x1,
185 int x2, 185 int x2,
186 int y, 186 int y,
(...skipping 18 matching lines...) Expand all
205 205
206 // The length of the arrow buttons, 0 means no buttons are drawn. 206 // The length of the arrow buttons, 0 means no buttons are drawn.
207 unsigned int scrollbar_button_length_; 207 unsigned int scrollbar_button_length_;
208 208
209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); 209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase);
210 }; 210 };
211 211
212 } // namespace ui 212 } // namespace ui
213 213
214 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_ 214 #endif // UI_NATIVE_THEME_NATIVE_THEME_BASE_H_
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_aura_unittest.cc ('k') | ui/native_theme/native_theme_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698