Commit e48e4289 authored by Peter Boström's avatar Peter Boström Committed by Commit Bot

Always use ELIDE_TAIL for bookmarks-bar buttons

This keeps bookmarks-bar entries more aligned with Windows style.

Bug: chromium:870158
Change-Id: I7a9e5a147cd9c12a1a5c5de58b40dfdd4c8eb0c9
Reviewed-on: https://chromium-review.googlesource.com/c/1284052Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601224}
parent 0986b5c1
...@@ -142,13 +142,6 @@ static const int kBookmarkBarAppsShortcutButtonTag = 2; ...@@ -142,13 +142,6 @@ static const int kBookmarkBarAppsShortcutButtonTag = 2;
namespace { namespace {
// How to elide bookmark and bookmark folders.
gfx::ElideBehavior GetElideBehavior() {
return views::PlatformStyle::kShouldElideBookmarksInBookmarksBar
? gfx::ELIDE_TAIL
: gfx::FADE_TAIL;
}
// To enable/disable BookmarkBar animations during testing. In production // To enable/disable BookmarkBar animations during testing. In production
// animations are enabled by default. // animations are enabled by default.
bool animations_enabled = true; bool animations_enabled = true;
...@@ -193,7 +186,6 @@ class BookmarkButtonBase : public views::LabelButton { ...@@ -193,7 +186,6 @@ class BookmarkButtonBase : public views::LabelButton {
: LabelButton(listener, title) { : LabelButton(listener, title) {
SetImageLabelSpacing(ChromeLayoutProvider::Get()->GetDistanceMetric( SetImageLabelSpacing(ChromeLayoutProvider::Get()->GetDistanceMetric(
DISTANCE_RELATED_LABEL_HORIZONTAL_LIST)); DISTANCE_RELATED_LABEL_HORIZONTAL_LIST));
SetElideBehavior(GetElideBehavior());
SetInkDropMode(InkDropMode::ON); SetInkDropMode(InkDropMode::ON);
set_has_ink_drop_action_on_click(true); set_has_ink_drop_action_on_click(true);
set_ink_drop_visible_opacity(kToolbarInkDropVisibleOpacity); set_ink_drop_visible_opacity(kToolbarInkDropVisibleOpacity);
...@@ -381,7 +373,6 @@ class BookmarkFolderButton : public BookmarkMenuButtonBase { ...@@ -381,7 +373,6 @@ class BookmarkFolderButton : public BookmarkMenuButtonBase {
views::MenuButtonListener* menu_button_listener, views::MenuButtonListener* menu_button_listener,
bool show_menu_marker) bool show_menu_marker)
: BookmarkMenuButtonBase(title, menu_button_listener, show_menu_marker) { : BookmarkMenuButtonBase(title, menu_button_listener, show_menu_marker) {
SetElideBehavior(GetElideBehavior());
show_animation_.reset(new gfx::SlideAnimation(this)); show_animation_.reset(new gfx::SlideAnimation(this));
if (!animations_enabled) { if (!animations_enabled) {
// For some reason during testing the events generated by animating // For some reason during testing the events generated by animating
......
...@@ -61,7 +61,6 @@ const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false; ...@@ -61,7 +61,6 @@ const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = false;
const bool PlatformStyle::kUseRipples = true; const bool PlatformStyle::kUseRipples = true;
const bool PlatformStyle::kTextfieldScrollsToStartOnFocusChange = false; const bool PlatformStyle::kTextfieldScrollsToStartOnFocusChange = false;
const bool PlatformStyle::kTextfieldUsesDragCursorWhenDraggable = true; const bool PlatformStyle::kTextfieldUsesDragCursorWhenDraggable = true;
const bool PlatformStyle::kShouldElideBookmarksInBookmarksBar = false;
const bool PlatformStyle::kPreferFocusRings = false; const bool PlatformStyle::kPreferFocusRings = false;
const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = false; const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = false;
......
...@@ -70,10 +70,6 @@ class VIEWS_EXPORT PlatformStyle { ...@@ -70,10 +70,6 @@ class VIEWS_EXPORT PlatformStyle {
// dragging but available to do so. // dragging but available to do so.
static const bool kTextfieldUsesDragCursorWhenDraggable; static const bool kTextfieldUsesDragCursorWhenDraggable;
// Whether bookmarks in the bookmarks bar are elided [and show elipses at the
// tail] or fade out.
static const bool kShouldElideBookmarksInBookmarksBar;
// The thickness and inset amount of focus ring halos. // The thickness and inset amount of focus ring halos.
static const float kFocusHaloThickness; static const float kFocusHaloThickness;
static const float kFocusHaloInset; static const float kFocusHaloInset;
......
...@@ -40,7 +40,6 @@ const bool PlatformStyle::kSelectAllOnRightClickWhenUnfocused = true; ...@@ -40,7 +40,6 @@ const bool PlatformStyle::kSelectAllOnRightClickWhenUnfocused = true;
const bool PlatformStyle::kTextfieldScrollsToStartOnFocusChange = true; const bool PlatformStyle::kTextfieldScrollsToStartOnFocusChange = true;
const bool PlatformStyle::kTextfieldUsesDragCursorWhenDraggable = false; const bool PlatformStyle::kTextfieldUsesDragCursorWhenDraggable = false;
const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true; const bool PlatformStyle::kTreeViewSelectionPaintsEntireRow = true;
const bool PlatformStyle::kShouldElideBookmarksInBookmarksBar = true;
const bool PlatformStyle::kUseRipples = false; const bool PlatformStyle::kUseRipples = false;
const bool PlatformStyle::kPreferFocusRings = true; const bool PlatformStyle::kPreferFocusRings = true;
const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = true; const bool PlatformStyle::kInactiveWidgetControlsAppearDisabled = true;
......
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