Skip to content

Commit

Permalink
cros: Remove the start search page in KSV.
Browse files Browse the repository at this point in the history
This cl updates the following views and behaviors in Keyboard Shortcut
Viewer (KSV).
1. Remove the start search page.
2. Add Esc and Back key supports and update behavior with Backspace key.
3. Unbold text in no search results page.
4. Make the search bar 2px longer at both sides to align with text.
5. Update strings and tooltips of buttons.
6. Make the window 32px wider in order to put all shortcuts in one line.

Bug: 768932
Test: Tested on device.
Change-Id: Ief361b80b8326dfd8b3aea1b0cd17a42040be95d
Reviewed-on: https://chromium-review.googlesource.com/942687
Commit-Queue: Tao Wu <wutao@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540372}
  • Loading branch information
wutao authored and Commit Bot committed Mar 2, 2018
1 parent 0e26b21 commit 626002f
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 331 deletions.
2 changes: 0 additions & 2 deletions ash/components/shortcut_viewer/vector_icons/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ aggregate_vector_icons("ksv_vector_icons") {
"ksv_search_close.icon",
"ksv_search_no_result.1x.icon",
"ksv_search_no_result.icon",
"ksv_search_start.1x.icon",
"ksv_search_start.icon",
"ksv_separator_plus.1x.icon",
"ksv_separator_plus.icon",
"ksv_arrow_down.1x.icon",
Expand Down
104 changes: 0 additions & 104 deletions ash/components/shortcut_viewer/vector_icons/ksv_search_start.1x.icon

This file was deleted.

104 changes: 0 additions & 104 deletions ash/components/shortcut_viewer/vector_icons/ksv_search_start.icon

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ void KeyboardShortcutItemView::MaybeCalculateAndDoLayout(int width) const {
// The width of |description_label_view_| and |shortcut_label_view_| as a
// ratio of its parent view's width. The unused width is to have some spacing
// in between the two views.
constexpr float kDescriptionViewPreferredWidthRatio = 0.32f;
constexpr float kShortcutViewPreferredWidthRatio = 0.65f;
// These values are chosen to put all the bubble views in one line.
constexpr float kDescriptionViewPreferredWidthRatio = 0.29f;
constexpr float kShortcutViewPreferredWidthRatio = 0.69f;
const int description_view_preferred_width =
width * kDescriptionViewPreferredWidthRatio;
const int shortcut_view_preferred_width =
Expand Down

0 comments on commit 626002f

Please sign in to comment.