Skip to content

Commit

Permalink
Update the chevron of <select>
Browse files Browse the repository at this point in the history
The change shrinks the size of the chevron of <select> based on the
latest design.


Bug: 1001577
Change-Id: I8edcee70a42bfbf13ab9c80a183764951251828f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1820013
Commit-Queue: Alex Keng <shihken@microsoft.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699830}
  • Loading branch information
alexkeng authored and Commit Bot committed Sep 25, 2019
1 parent 6cb615b commit ae703e9
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ void ThemePainterDefault::SetupMenuListArrow(
} else {
// TODO(tkent): This should be 7.0 to match scroll bar buttons.
float arrow_size =
(RuntimeEnabledFeatures::FormControlsRefreshEnabled() ? 12.0 : 6.0) *
(RuntimeEnabledFeatures::FormControlsRefreshEnabled() ? 8.0 : 6.0) *
arrow_scale_factor;
// Put the arrow at the center of paddingForArrow area.
// |arrowX| is the left position for Aura theme engine.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ui/native_theme/native_theme_aura.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const SkScalar kSliderTrackHeight = 8.f;
const int kSliderThumbSize = 16;
const SkScalar kSliderThumbBorderWidth = 1.f;
const SkScalar kSliderThumbBorderHoveredWidth = 1.f;
const SkScalar kMenuListArrowStrokeWidth = 1.f;
const SkScalar kMenuListArrowStrokeWidth = 2.f;
// The "dash" is 8x2 px by default (the checkbox is 13x13 px).
const SkScalar kIndeterminateInsetWidthRatio = (13 - 8) / 2.0f / 13;
const SkScalar kIndeterminateInsetHeightRatio = (13 - 2) / 2.0f / 13;
Expand Down Expand Up @@ -900,7 +900,7 @@ void NativeThemeAura::PaintMenuList(cc::PaintCanvas* canvas,
flags.setStrokeWidth(kMenuListArrowStrokeWidth);

float arrow_width = menu_list.arrow_size;
int arrow_height = arrow_width * 0.6;
int arrow_height = arrow_width * 0.5;
gfx::Rect arrow(menu_list.arrow_x, menu_list.arrow_y - (arrow_height / 2),
arrow_width, arrow_height);
arrow.Intersect(rect);
Expand Down

0 comments on commit ae703e9

Please sign in to comment.