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

Unified Diff: ash/common/system/chromeos/screen_security/screen_tray_item.cc

Issue 2638163002: [ash-md] Fixed multi line label layout for system tray cast rows. (Closed)
Patch Set: Removed border from label and added it to the container view. Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/screen_security/screen_tray_item.cc
diff --git a/ash/common/system/chromeos/screen_security/screen_tray_item.cc b/ash/common/system/chromeos/screen_security/screen_tray_item.cc
index 55b20a1708e5aa55850b2174d671bf32e644f3f2..4e43e651dafebfefebb9f24c94f44ebe91376197 100644
--- a/ash/common/system/chromeos/screen_security/screen_tray_item.cc
+++ b/ash/common/system/chromeos/screen_security/screen_tray_item.cc
@@ -58,6 +58,11 @@ ScreenStatusView::ScreenStatusView(ScreenTrayItem* screen_tray_item,
SetLayoutManager(new views::FillLayout);
AddChildView(tri_view);
tri_view->AddView(TriView::Container::START, icon_);
+ // TODO(bruthig): Multiline Label's don't lay out well with borders so we add
Jorge Lucangeli Obes 2017/01/18 02:44:43 Nit: "Labels"? This is not a possessive case, is i
bruthig 2017/01/18 15:06:38 Done.
+ // the border to the Label's container instead. See https://crbug.com/678337.
+ tri_view->SetContainerBorder(
+ TriView::Container::CENTER,
+ views::CreateEmptyBorder(0, 0, 0, kTrayPopupLabelRightPadding));
tri_view->AddView(TriView::Container::CENTER, label_);
tri_view->AddView(TriView::Container::END, stop_button_);
tri_view->SetContainerBorder(
@@ -92,6 +97,9 @@ void ScreenStatusView::CreateItems() {
label_ = TrayPopupUtils::CreateDefaultLabel();
label_->SetMultiLine(true);
label_->SetText(label_text_);
+ // TODO(bruthig): Multiline Label's don't lay out well with borders.
Jorge Lucangeli Obes 2017/01/18 02:44:43 Same.
bruthig 2017/01/18 15:06:38 Done.
+ // See https://crbug.com/678337.
+ label_->SetBorder(nullptr);
stop_button_ = TrayPopupUtils::CreateTrayPopupButton(this, stop_button_text_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698