Commit 86a28751 authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Make quick setting label buttons never overflow with ellipsis.

The font rendering system seems to take into account screen resolution when
deciding whether to elide the text or not. However, this looks very bad and we
should never elide for these buttons.

BUG=1005764

Change-Id: I5f147f47a7cad3890b7997c08a377f5ae6f381fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819560Reviewed-by: default avatarAhmed Mehfooz <amehfooz@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700053}
parent e59f5fa8
......@@ -25,6 +25,7 @@ RoundedLabelButton::RoundedLabelButton(views::ButtonListener* listener,
AshColorProvider::ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
SetHorizontalAlignment(gfx::ALIGN_CENTER);
SetBorder(views::CreateEmptyBorder(gfx::Insets()));
label()->SetElideBehavior(gfx::NO_ELIDE);
label()->SetSubpixelRenderingEnabled(false);
label()->SetFontList(views::Label::GetDefaultFontList().Derive(
1, gfx::Font::NORMAL, gfx::Font::Weight::MEDIUM));
......
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