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

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: Fixed/updated some docs. 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..4f5f73cb9ce12d2738199a24c485b359ad45ebef 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,12 @@ ScreenStatusView::ScreenStatusView(ScreenTrayItem* screen_tray_item,
SetLayoutManager(new views::FillLayout);
AddChildView(tri_view);
tri_view->AddView(TriView::Container::START, icon_);
+ // TODO(bruthig): Multiline Labels don't lay out well with borders so we add
+ // the border to the Label's container instead. See https://crbug.com/678337 &
+ // https://crbug.com/682221.
+ 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 +98,9 @@ void ScreenStatusView::CreateItems() {
label_ = TrayPopupUtils::CreateDefaultLabel();
label_->SetMultiLine(true);
label_->SetText(label_text_);
+ // TODO(bruthig): Multiline Labels don't lay out well with borders.
+ // See https://crbug.com/678337 & https://crbug.com/682221.
+ 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