Chromium Code Reviews| Index: ui/base/cursor/cursors_aura.cc |
| diff --git a/ui/base/cursor/cursors_aura.cc b/ui/base/cursor/cursors_aura.cc |
| index a69517f37de408729ad3ca9537b7fe46c021883c..19702a51182839dbdd99a69fa85d768b4be037f7 100644 |
| --- a/ui/base/cursor/cursors_aura.cc |
| +++ b/ui/base/cursor/cursors_aura.cc |
| @@ -175,9 +175,9 @@ bool SearchTable(const CursorData* table, |
| for (size_t i = 0; i < table_length; ++i) { |
| if (table[i].id == id) { |
| *resource_id = table[i].resource_id; |
| - *point = scale_factor == 1.0f || !resource_2x_available ? |
| - gfx::Point(table[i].hot_1x.x, table[i].hot_1x.y) : |
| - gfx::Point(table[i].hot_2x.x, table[i].hot_2x.y); |
| + *point = scale_factor != 2.0f || !resource_2x_available |
| + ? gfx::Point(table[i].hot_1x.x, table[i].hot_1x.y) |
| + : gfx::Point(table[i].hot_2x.x, table[i].hot_2x.y); |
|
sadrul
2017/01/03 17:18:09
Why change this?
braveyao
2017/01/03 17:30:51
To make the 1x as the default, which I suppose cou
sadrul
2017/01/04 16:16:24
I think we prefer the 2x versions for other image
braveyao
2017/01/04 17:37:36
Done.
|
| return true; |
| } |
| } |
| @@ -239,6 +239,7 @@ bool GetCursorBitmap(const Cursor& cursor, |
| cursor_loader.SetPlatformCursor(&cursor_copy); |
| const std::unique_ptr<SkBitmap> cursor_bitmap( |
| IconUtil::CreateSkBitmapFromHICON(cursor_copy.platform())); |
| + *point = IconUtil::GetHotSpotFromHICON(cursor_copy.platform()); |
| #else |
| int resource_id; |
| if (!GetCursorDataFor(ui::CURSOR_SET_NORMAL, |