Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: ash/launcher/launcher_tooltip_manager.cc

Issue 14654018: Make Label's NO_ELIDE setting actually not elide, and change the default (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/launcher/launcher_tooltip_manager.h" 5 #include "ash/launcher/launcher_tooltip_manager.h"
6 6
7 #include "ash/launcher/launcher_view.h" 7 #include "ash/launcher/launcher_view.h"
8 #include "ash/shelf/shelf_layout_manager.h" 8 #include "ash/shelf/shelf_layout_manager.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // The anchor may not have the widget in tests. 96 // The anchor may not have the widget in tests.
97 if (anchor->GetWidget() && anchor->GetWidget()->GetNativeView()) { 97 if (anchor->GetWidget() && anchor->GetWidget()->GetNativeView()) {
98 aura::RootWindow* root_window = 98 aura::RootWindow* root_window =
99 anchor->GetWidget()->GetNativeView()->GetRootWindow(); 99 anchor->GetWidget()->GetNativeView()->GetRootWindow();
100 set_parent_window(ash::Shell::GetInstance()->GetContainer( 100 set_parent_window(ash::Shell::GetInstance()->GetContainer(
101 root_window, ash::internal::kShellWindowId_SettingBubbleContainer)); 101 root_window, ash::internal::kShellWindowId_SettingBubbleContainer));
102 } 102 }
103 label_ = new views::Label; 103 label_ = new views::Label;
104 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 104 label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
105 label_->SetEnabledColor(kTooltipTextColor); 105 label_->SetEnabledColor(kTooltipTextColor);
106 label_->SetElideBehavior(views::Label::ELIDE_AT_END);
107 AddChildView(label_); 106 AddChildView(label_);
108 views::BubbleDelegateView::CreateBubble(this); 107 views::BubbleDelegateView::CreateBubble(this);
109 } 108 }
110 109
111 void LauncherTooltipManager::LauncherTooltipBubble::SetText( 110 void LauncherTooltipManager::LauncherTooltipBubble::SetText(
112 const base::string16& text) { 111 const base::string16& text) {
113 label_->SetText(text); 112 label_->SetText(text);
114 SizeToContents(); 113 SizeToContents();
115 } 114 }
116 115
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 362
364 gfx::NativeView native_view = widget_->GetNativeView(); 363 gfx::NativeView native_view = widget_->GetNativeView();
365 views::corewm::SetWindowVisibilityAnimationType( 364 views::corewm::SetWindowVisibilityAnimationType(
366 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); 365 native_view, views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
367 views::corewm::SetWindowVisibilityAnimationTransition( 366 views::corewm::SetWindowVisibilityAnimationTransition(
368 native_view, views::corewm::ANIMATE_HIDE); 367 native_view, views::corewm::ANIMATE_HIDE);
369 } 368 }
370 369
371 } // namespace internal 370 } // namespace internal
372 } // namespace ash 371 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | ui/views/controls/label.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698