From feea7ddf77d929d0bd6e39cccbdf2df003f2eb60 Mon Sep 17 00:00:00 2001 From: "yoshiki@chromium.org" Date: Mon, 26 Aug 2013 17:07:36 +0000 Subject: [A11y Large Cursor] Add assets of large mouse cursor. This patch adds the assets (png images) of large mouse cursor. Animated cursor will be added by another patch when ready. BUG=247254 TEST=Enables the large cursor feature with https://codereview.chromium.org/23248008/, and confirm that big cursor icons are shown. R=sky@chromium.org Review URL: https://codereview.chromium.org/23072047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219563 0039d316-1c4b-4281-b951-d872f2087c98 --- ui/base/cursor/cursor.h | 2 - ui/base/cursor/cursors_aura.cc | 53 ++++++++++++++++++++- .../common/pointers/alias_big.png | Bin 0 -> 2358 bytes .../common/pointers/cell_big.png | Bin 0 -> 509 bytes .../common/pointers/context_menu_big.png | Bin 0 -> 1325 bytes .../common/pointers/copy_big.png | Bin 0 -> 2414 bytes .../common/pointers/crosshair_big.png | Bin 0 -> 164 bytes .../common/pointers/fleur_big.png | Bin 0 -> 1765 bytes .../common/pointers/hand2_big.png | Bin 0 -> 1387 bytes .../common/pointers/hand3_big.png | Bin 0 -> 1401 bytes .../common/pointers/help_big.png | Bin 0 -> 1768 bytes .../common/pointers/left_ptr_big.png | Bin 0 -> 1084 bytes .../common/pointers/move_big.png | Bin 0 -> 1166 bytes .../common/pointers/nodrop_big.png | Bin 0 -> 2636 bytes .../common/pointers/sb_h_double_arrow_big.png | Bin 0 -> 828 bytes .../common/pointers/sb_v_double_arrow_big.png | Bin 0 -> 801 bytes .../common/pointers/top_left_corner_big.png | Bin 0 -> 1000 bytes .../common/pointers/top_right_corner_big.png | Bin 0 -> 991 bytes .../common/pointers/xterm_big.png | Bin 0 -> 488 bytes .../common/pointers/xterm_horiz_big.png | Bin 0 -> 495 bytes .../common/pointers/zoom_in_big.png | Bin 0 -> 2287 bytes .../common/pointers/zoom_out_big.png | Bin 0 -> 2243 bytes ui/resources/ui_resources.grd | 31 ++++++++++++ 23 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 ui/resources/default_100_percent/common/pointers/alias_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/cell_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/context_menu_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/copy_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/crosshair_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/fleur_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/hand2_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/hand3_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/help_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/left_ptr_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/move_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/nodrop_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/sb_h_double_arrow_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/sb_v_double_arrow_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/top_left_corner_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/top_right_corner_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/xterm_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/xterm_horiz_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/zoom_in_big.png create mode 100644 ui/resources/default_100_percent/common/pointers/zoom_out_big.png (limited to 'ui') diff --git a/ui/base/cursor/cursor.h b/ui/base/cursor/cursor.h index 40cfb2e..bb832fa 100644 --- a/ui/base/cursor/cursor.h +++ b/ui/base/cursor/cursor.h @@ -84,8 +84,6 @@ const int kCursorCustom = 44; enum CursorSetType { CURSOR_SET_NORMAL, - // Don't use this large cursor set now, except in tests. Large assets are not - // added yet. crbug.com/247254 CURSOR_SET_LARGE }; diff --git a/ui/base/cursor/cursors_aura.cc b/ui/base/cursor/cursors_aura.cc index d27a7b7..bb5947a 100644 --- a/ui/base/cursor/cursors_aura.cc +++ b/ui/base/cursor/cursors_aura.cc @@ -74,6 +74,52 @@ const CursorData kNormalCursors[] = { {ui::kCursorGrabbing, IDR_AURA_CURSOR_GRABBING, {9, 9}, {18, 18}}, }; +const CursorData kLargeCursors[] = { + {ui::kCursorNull, IDR_AURA_CURSOR_BIG_PTR, {10, 10}, {10, 10}}, + {ui::kCursorPointer, IDR_AURA_CURSOR_BIG_PTR, {10, 10}, {10, 10}}, + {ui::kCursorNoDrop, IDR_AURA_CURSOR_BIG_NO_DROP, {23, 23}, {23, 23}}, + {ui::kCursorNotAllowed, IDR_AURA_CURSOR_BIG_NO_DROP, {23, 23}, {23, 23}}, + {ui::kCursorCopy, IDR_AURA_CURSOR_BIG_COPY, {23, 23}, {23, 23}}, + {ui::kCursorHand, IDR_AURA_CURSOR_BIG_HAND, {23, 10}, {23, 10}}, + {ui::kCursorMove, IDR_AURA_CURSOR_BIG_MOVE, {28, 28}, {28, 28}}, + {ui::kCursorNorthEastResize, IDR_AURA_CURSOR_BIG_NORTH_EAST_RESIZE, + {31, 28}, {31, 28}}, + {ui::kCursorSouthWestResize, IDR_AURA_CURSOR_BIG_SOUTH_WEST_RESIZE, + {31, 28}, {31, 28}}, + {ui::kCursorSouthEastResize, IDR_AURA_CURSOR_BIG_SOUTH_EAST_RESIZE, + {28, 28}, {28, 28}}, + {ui::kCursorNorthWestResize, IDR_AURA_CURSOR_BIG_NORTH_WEST_RESIZE, + {28, 28}, {28, 28}}, + {ui::kCursorNorthResize, IDR_AURA_CURSOR_BIG_NORTH_RESIZE, + {28, 31}, {28, 31}}, + {ui::kCursorSouthResize, IDR_AURA_CURSOR_BIG_SOUTH_RESIZE, + {28, 31}, {28, 31}}, + {ui::kCursorEastResize, IDR_AURA_CURSOR_BIG_EAST_RESIZE, {31, 28}, {31, 28}}, + {ui::kCursorWestResize, IDR_AURA_CURSOR_BIG_WEST_RESIZE, {31, 28}, {31, 28}}, + {ui::kCursorIBeam, IDR_AURA_CURSOR_BIG_IBEAM, {31, 31}, {31, 31}}, + {ui::kCursorAlias, IDR_AURA_CURSOR_BIG_ALIAS, {51, 15}, {51, 11}}, + {ui::kCursorCell, IDR_AURA_CURSOR_BIG_CELL, {28, 28}, {24, 23}}, + {ui::kCursorContextMenu, IDR_AURA_CURSOR_BIG_CONTEXT_MENU, {4, 4}, {8, 9}}, + {ui::kCursorCross, IDR_AURA_CURSOR_BIG_CROSSHAIR, {31, 31}, {31, 31}}, + {ui::kCursorHelp, IDR_AURA_CURSOR_BIG_HELP, {10, 10}, {8, 9}}, + {ui::kCursorVerticalText, IDR_AURA_CURSOR_BIG_XTERM_HORIZ, + {31, 28}, {31, 28}}, + {ui::kCursorZoomIn, IDR_AURA_CURSOR_BIG_ZOOM_IN, {26, 26}, {26, 26}}, + {ui::kCursorZoomOut, IDR_AURA_CURSOR_BIG_ZOOM_OUT, {26, 26}, {26, 26}}, + {ui::kCursorRowResize, IDR_AURA_CURSOR_BIG_ROW_RESIZE, {28, 31}, {28, 31}}, + {ui::kCursorColumnResize, IDR_AURA_CURSOR_BIG_COL_RESIZE, {31, 28}, {31, 28}}, + {ui::kCursorEastWestResize, IDR_AURA_CURSOR_BIG_EAST_WEST_RESIZE, + {31, 28}, {31, 28}}, + {ui::kCursorNorthSouthResize, IDR_AURA_CURSOR_BIG_NORTH_SOUTH_RESIZE, + {28, 31}, {28, 31}}, + {ui::kCursorNorthEastSouthWestResize, + IDR_AURA_CURSOR_BIG_NORTH_EAST_SOUTH_WEST_RESIZE, {31, 28}, {31, 28}}, + {ui::kCursorNorthWestSouthEastResize, + IDR_AURA_CURSOR_BIG_NORTH_WEST_SOUTH_EAST_RESIZE, {28, 28}, {28, 28}}, + {ui::kCursorGrab, IDR_AURA_CURSOR_BIG_GRAB, {20, 13}, {20, 13}}, + {ui::kCursorGrabbing, IDR_AURA_CURSOR_BIG_GRABBING, {23, 23}, {23, 23}}, +}; + const CursorData kAnimatedCursors[] = { {ui::kCursorWait, IDR_THROBBER, {7, 7}, {14, 14}}, {ui::kCursorProgress, IDR_THROBBER, {7, 7}, {14, 14}}, @@ -85,7 +131,12 @@ const CursorSet kCursorSets[] = { kNormalCursors, arraysize(kNormalCursors), kAnimatedCursors, arraysize(kAnimatedCursors) }, - // TODO)yoshiki): Add Large cursor set. crbug.com/247254 + { + CURSOR_SET_LARGE, + kLargeCursors, arraysize(kLargeCursors), + // TODO(yoshiki): Replace animated cursors with big assets. crbug.com/247254 + kAnimatedCursors, arraysize(kAnimatedCursors) + }, }; const CursorSet* GetCursorSetByType(CursorSetType cursor_set_id) { diff --git a/ui/resources/default_100_percent/common/pointers/alias_big.png b/ui/resources/default_100_percent/common/pointers/alias_big.png new file mode 100644 index 0000000..283bf7f Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/alias_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/cell_big.png b/ui/resources/default_100_percent/common/pointers/cell_big.png new file mode 100644 index 0000000..3dec5e5 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/cell_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/context_menu_big.png b/ui/resources/default_100_percent/common/pointers/context_menu_big.png new file mode 100644 index 0000000..7c9e250 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/context_menu_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/copy_big.png b/ui/resources/default_100_percent/common/pointers/copy_big.png new file mode 100644 index 0000000..3e38e45 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/copy_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/crosshair_big.png b/ui/resources/default_100_percent/common/pointers/crosshair_big.png new file mode 100644 index 0000000..ea1f5fc Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/crosshair_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/fleur_big.png b/ui/resources/default_100_percent/common/pointers/fleur_big.png new file mode 100644 index 0000000..2e32766 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/fleur_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/hand2_big.png b/ui/resources/default_100_percent/common/pointers/hand2_big.png new file mode 100644 index 0000000..63bb959 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/hand2_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/hand3_big.png b/ui/resources/default_100_percent/common/pointers/hand3_big.png new file mode 100644 index 0000000..3c54751 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/hand3_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/help_big.png b/ui/resources/default_100_percent/common/pointers/help_big.png new file mode 100644 index 0000000..6552f9b Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/help_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/left_ptr_big.png b/ui/resources/default_100_percent/common/pointers/left_ptr_big.png new file mode 100644 index 0000000..c5604c7 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/left_ptr_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/move_big.png b/ui/resources/default_100_percent/common/pointers/move_big.png new file mode 100644 index 0000000..c29db87 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/move_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/nodrop_big.png b/ui/resources/default_100_percent/common/pointers/nodrop_big.png new file mode 100644 index 0000000..da981df3 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/nodrop_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/sb_h_double_arrow_big.png b/ui/resources/default_100_percent/common/pointers/sb_h_double_arrow_big.png new file mode 100644 index 0000000..49dc3d3 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/sb_h_double_arrow_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/sb_v_double_arrow_big.png b/ui/resources/default_100_percent/common/pointers/sb_v_double_arrow_big.png new file mode 100644 index 0000000..7b2135d2 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/sb_v_double_arrow_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/top_left_corner_big.png b/ui/resources/default_100_percent/common/pointers/top_left_corner_big.png new file mode 100644 index 0000000..eecaa89 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/top_left_corner_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/top_right_corner_big.png b/ui/resources/default_100_percent/common/pointers/top_right_corner_big.png new file mode 100644 index 0000000..9d47ecf Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/top_right_corner_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/xterm_big.png b/ui/resources/default_100_percent/common/pointers/xterm_big.png new file mode 100644 index 0000000..2fba190 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/xterm_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/xterm_horiz_big.png b/ui/resources/default_100_percent/common/pointers/xterm_horiz_big.png new file mode 100644 index 0000000..94f5ddc Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/xterm_horiz_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/zoom_in_big.png b/ui/resources/default_100_percent/common/pointers/zoom_in_big.png new file mode 100644 index 0000000..923ad79 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/zoom_in_big.png differ diff --git a/ui/resources/default_100_percent/common/pointers/zoom_out_big.png b/ui/resources/default_100_percent/common/pointers/zoom_out_big.png new file mode 100644 index 0000000..aa47eb9 Binary files /dev/null and b/ui/resources/default_100_percent/common/pointers/zoom_out_big.png differ diff --git a/ui/resources/ui_resources.grd b/ui/resources/ui_resources.grd index 2cb91be..dd510db 100644 --- a/ui/resources/ui_resources.grd +++ b/ui/resources/ui_resources.grd @@ -36,6 +36,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1