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

Side by Side Diff: ui/native_theme/native_theme_base.h

Issue 1911973002: Fix scrollbar buttons at hidpi when enable-use-zoom-for-dsf is on. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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"
11 #include "base/gtest_prod_util.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "skia/ext/platform_canvas.h" 13 #include "skia/ext/platform_canvas.h"
13 #include "ui/native_theme/native_theme.h" 14 #include "ui/native_theme/native_theme.h"
14 15
15 namespace gfx { 16 namespace gfx {
16 class Canvas; 17 class Canvas;
17 class ImageSkia; 18 class ImageSkia;
18 class Rect; 19 class Rect;
19 class Size; 20 class Size;
20 } 21 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // Paints the arrow used on the scrollbar and spinner. 163 // Paints the arrow used on the scrollbar and spinner.
163 void PaintArrow(SkCanvas* canvas, 164 void PaintArrow(SkCanvas* canvas,
164 const gfx::Rect& rect, 165 const gfx::Rect& rect,
165 Part direction, 166 Part direction,
166 SkColor color) const; 167 SkColor color) const;
167 168
168 // Returns the color used to draw the arrow. 169 // Returns the color used to draw the arrow.
169 SkColor GetArrowColor(State state) const; 170 SkColor GetArrowColor(State state) const;
170 171
171 private: 172 private:
173 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, VerticalArrows);
174 FRIEND_TEST_ALL_PREFIXES(NativeThemeAuraTest, HorizontalArrows);
175
176 SkPath PathForArrow(const gfx::Rect& rect, Part direction) const;
177
172 void DrawVertLine(SkCanvas* canvas, 178 void DrawVertLine(SkCanvas* canvas,
173 int x, 179 int x,
174 int y1, 180 int y1,
175 int y2, 181 int y2,
176 const SkPaint& paint) const; 182 const SkPaint& paint) const;
177 void DrawHorizLine(SkCanvas* canvas, 183 void DrawHorizLine(SkCanvas* canvas,
178 int x1, 184 int x1,
179 int x2, 185 int x2,
180 int y, 186 int y,
181 const SkPaint& paint) const; 187 const SkPaint& paint) const;
(...skipping 17 matching lines...) Expand all
199 205
200 // 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.
201 unsigned int scrollbar_button_length_; 207 unsigned int scrollbar_button_length_;
202 208
203 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase); 209 DISALLOW_COPY_AND_ASSIGN(NativeThemeBase);
204 }; 210 };
205 211
206 } // namespace ui 212 } // namespace ui
207 213
208 #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