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

Unified Diff: ui/app_list/views/app_list_item_view.cc

Issue 23709003: Display an app's short name in the app launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation errors in app list unit tests on mac Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/app_list_item_view.h ('k') | ui/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/app_list_item_view.cc
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index 1b9aaf701d1273807d552101b9005f5947adaa1d..a5ab09d3ff2266ae9ac49c93574c258fb23ab94c 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -130,6 +130,11 @@ void AppListItemView::UpdateIcon() {
icon_->SetImage(resized);
}
+void AppListItemView::UpdateTooltip() {
+ title_->SetTooltipText(model_->title() == model_->full_name() ?
+ string16() : UTF8ToUTF16(model_->full_name()));
+}
+
void AppListItemView::SetUIState(UIState state) {
if (ui_state_ == state)
return;
@@ -193,6 +198,7 @@ void AppListItemView::ItemIconChanged() {
void AppListItemView::ItemTitleChanged() {
title_->SetText(UTF8ToUTF16(model_->title()));
title_->Invalidate();
+ UpdateTooltip();
Layout();
}
« no previous file with comments | « ui/app_list/views/app_list_item_view.h ('k') | ui/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698