Commit a44633ed authored by David Black's avatar David Black Committed by Commit Bot

Refine DialogPlate visuals.

This CL:
- Changes font size.
- Changes icon size.
- Fixes spacing between icons.

Also updated suggestion chip font size per the spec.

See bug for screenshots.

Bug: b:112313532
Change-Id: I40942e15d17e951a66d334164e5a999169a162ce
Reviewed-on: https://chromium-review.googlesource.com/1172146
Commit-Queue: David Black <dmblack@google.com>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582809}
parent 1dc23285
...@@ -118,7 +118,7 @@ void SuggestionChipView::InitLayout(const Params& params) { ...@@ -118,7 +118,7 @@ void SuggestionChipView::InitLayout(const Params& params) {
: kAppListTextColor); : kAppListTextColor);
text_view_->SetFontList( text_view_->SetFontList(
assistant_style_ assistant_style_
? ash::assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(2) ? ash::assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(1)
: AppListConfig::instance().app_title_font()); : AppListConfig::instance().app_title_font());
SetText(params.text); SetText(params.text);
AddChildView(text_view_); AddChildView(text_view_);
......
...@@ -20,7 +20,7 @@ namespace ash { ...@@ -20,7 +20,7 @@ namespace ash {
namespace { namespace {
// Appearance. // Appearance.
constexpr int kPreferredSizeDip = 26; constexpr int kPreferredSizeDip = 22;
} // namespace } // namespace
......
...@@ -31,7 +31,9 @@ namespace ash { ...@@ -31,7 +31,9 @@ namespace ash {
namespace { namespace {
// Appearance. // Appearance.
constexpr int kIconSizeDip = 24; constexpr int kIconSizeDip = 20;
constexpr int kKeyboardLayoutPaddingLeftDip = 18;
constexpr int kKeyboardLayoutPaddingRightDip = 24;
constexpr int kPreferredHeightDip = 48; constexpr int kPreferredHeightDip = 48;
// Animation. // Animation.
...@@ -145,13 +147,15 @@ void DialogPlate::InitKeyboardLayoutContainer( ...@@ -145,13 +147,15 @@ void DialogPlate::InitKeyboardLayoutContainer(
keyboard_layout_container_->SetLayoutManager( keyboard_layout_container_->SetLayoutManager(
std::make_unique<views::BoxLayout>( std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kHorizontal, views::BoxLayout::Orientation::kHorizontal,
gfx::Insets(0, kPaddingDip), kSpacingDip)); gfx::Insets(0, kKeyboardLayoutPaddingLeftDip, 0,
kKeyboardLayoutPaddingRightDip),
kSpacingDip));
layout_manager->set_cross_axis_alignment( layout_manager->set_cross_axis_alignment(
views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER); views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER);
gfx::FontList font_list = gfx::FontList font_list =
assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(4); assistant::ui::GetDefaultFontList().DeriveWithSizeDelta(2);
// Textfield. // Textfield.
textfield_ = new views::Textfield(); textfield_ = new views::Textfield();
......
...@@ -288,7 +288,8 @@ void AssistantMainStage::InitOverlayLayoutContainer() { ...@@ -288,7 +288,8 @@ void AssistantMainStage::InitOverlayLayoutContainer() {
greeting_label_ = new views::Label( greeting_label_ = new views::Label(
l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_PROMPT_DEFAULT)); l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_PROMPT_DEFAULT));
greeting_label_->SetAutoColorReadabilityEnabled(false); greeting_label_->SetAutoColorReadabilityEnabled(false);
greeting_label_->SetBorder(views::CreateEmptyBorder(/*top=*/32, 0, 0, 0)); greeting_label_->SetBorder(
views::CreateEmptyBorder(kGreetingLabelMarginTopDip, 0, 0, 0));
greeting_label_->SetEnabledColor(kTextColorPrimary); greeting_label_->SetEnabledColor(kTextColorPrimary);
greeting_label_->SetFontList( greeting_label_->SetFontList(
assistant::ui::GetDefaultFontList() assistant::ui::GetDefaultFontList()
......
...@@ -2,24 +2,24 @@ ...@@ -2,24 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
CANVAS_DIMENSIONS, 24, CANVAS_DIMENSIONS, 20,
MOVE_TO, 4, 19, MOVE_TO, 3.33f, 15.83f,
H_LINE_TO, 20, H_LINE_TO, 16.67f,
V_LINE_TO, 5, V_LINE_TO, 4.17f,
H_LINE_TO, 4, H_LINE_TO, 3.33f,
CLOSE, CLOSE,
MOVE_TO, 3.25f, 21, MOVE_TO, 2.71f, 17.5f,
CUBIC_TO, 2.56f, 21, 2, 20.44f, 2, 19.75f, CUBIC_TO, 2.13f, 17.5f, 1.67f, 17.03f, 1.67f, 16.46f,
V_LINE_TO, 4.25f, V_LINE_TO, 3.54f,
CUBIC_TO, 2, 3.56f, 2.56f, 3, 3.25f, 3, CUBIC_TO, 1.67f, 2.97f, 2.13f, 2.5f, 2.71f, 2.5f,
R_H_LINE_TO, 17.5f, H_LINE_TO, 17.29f,
CUBIC_TO, 21.44f, 3, 22, 3.56f, 22, 4.25f, R_CUBIC_TO, 0.57f, 0, 1.04f, 0.47f, 1.04f, 1.04f,
R_V_LINE_TO, 15.5f, V_LINE_TO, 16.46f,
CUBIC_TO, 22, 20.44f, 21.44f, 21, 20.75f, 21, R_CUBIC_TO, 0, 0.57f, -0.47f, 1.04f, -1.04f, 1.04f,
CLOSE, CLOSE,
ROUND_RECT, 7, 9, 2, 2, 0, ROUND_RECT, 5.8330002, 7.5, 1.6670001, 1.6670001, 0,
ROUND_RECT, 11, 9, 2, 2, 0, ROUND_RECT, 12.5, 7.5, 1.6670001, 1.6670001, 0,
ROUND_RECT, 15, 9, 2, 2, 0, ROUND_RECT, 9.1669998, 7.5, 1.6670001, 1.6670001, 0,
ROUND_RECT, 7, 13, 2, 2, 0, ROUND_RECT, 5.8330002, 10.833, 1.6670001, 1.6670001, 0,
ROUND_RECT, 11, 13, 2, 2, 0, ROUND_RECT, 9.1669998, 10.833, 1.6670001, 1.6670001, 0,
ROUND_RECT, 15, 13, 2, 2, 0 ROUND_RECT, 12.5, 10.833, 1.6670001, 1.6670001, 0
...@@ -2,32 +2,30 @@ ...@@ -2,32 +2,30 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
CANVAS_DIMENSIONS, 24, CANVAS_DIMENSIONS, 20,
PATH_COLOR_ARGB, 0xFF, 0x34, 0xA8, 0x53, PATH_COLOR_ARGB, 0xFF, 0x34, 0xA8, 0x53,
ROUND_RECT, 10.666667, 18.5, 2.6666667, 2.8333333, 0, ROUND_RECT, 8.8900003, 15.42, 2.22, 2.3599999, 0,
NEW_PATH, NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0x42, 0x85, 0xF4, PATH_COLOR_ARGB, 0xFF, 0x42, 0x85, 0xF4,
MOVE_TO, 12, 14.67f, MOVE_TO, 10, 12.22f,
ARC_TO, 2.67f, 2.67f, 0, 0, 0, 14.67f, 12, ARC_TO, 2.22f, 2.22f, 0, 0, 0, 12.22f, 10,
V_LINE_TO, 5.33f, V_LINE_TO, 4.44f,
R_ARC_TO, 2.67f, 2.67f, 0, 1, 0, -5.33f, 0, R_ARC_TO, 2.22f, 2.22f, 0, 0, 0, -4.44f, 0,
V_LINE_TO, 12, V_LINE_TO, 10,
ARC_TO, 2.67f, 2.67f, 0, 0, 0, 12, 14.67f, ARC_TO, 2.22f, 2.22f, 0, 0, 0, 10, 12.22f,
CLOSE, CLOSE,
NEW_PATH, NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0xFB, 0xBC, 0x05, PATH_COLOR_ARGB, 0xFF, 0xFB, 0xBC, 0x05,
R_MOVE_TO, 7.33f, 12, MOVE_TO, 6.11f, 10,
R_H_LINE_TO, -2, H_LINE_TO, 4.44f,
R_ARC_TO, 6.67f, 6.67f, 0, 0, 0, 1.95f, 4.71f, R_ARC_TO, 5.54f, 5.54f, 0, 0, 0, 1.63f, 3.93f,
LINE_TO, 8.7f, 15.3f, LINE_TO, 7.25f, 12.75f,
ARC_TO, 4.67f, 4.67f, 0, 0, 1, 7.33f, 12, ARC_TO, 3.88f, 3.88f, 0, 0, 1, 6.11f, 10,
CLOSE, CLOSE,
NEW_PATH, NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0xEA, 0x43, 0x35, PATH_COLOR_ARGB, 0xFF, 0xEA, 0x43, 0x35,
MOVE_TO, 12, 16.67f, MOVE_TO, 13.89f, 10,
ARC_TO, 4.67f, 4.67f, 0, 0, 1, 8.7f, 15.3f, ARC_TO, 3.89f, 3.89f, 0, 0, 1, 7.25f, 12.75f,
LINE_TO, 7.29f, 16.71f, LINE_TO, 6.07f, 13.93f,
ARC_TO, 6.67f, 6.67f, 0, 0, 0, 18.67f, 12, ARC_TO, 5.56f, 5.56f, 0, 0, 0, 15.56f, 10,
R_H_LINE_TO, -2,
ARC_TO, 4.67f, 4.67f, 0, 0, 1, 12, 16.67f,
CLOSE CLOSE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment