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

Unified Diff: ash/system/tray/tri_view.cc

Issue 2932053003: [ash] Made TriView's re-layout automatically when a child container's visibility changes. (Closed)
Patch Set: Fixed compile error. Created 3 years, 6 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 | « ash/system/tray/tri_view.h ('k') | ash/system/tray/tri_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tri_view.cc
diff --git a/ash/system/tray/tri_view.cc b/ash/system/tray/tri_view.cc
index d9d54c4998686879464107eb6532507d0b241517..6bc32115e7ade5b0b68aa81caa8fe8479418344e 100644
--- a/ash/system/tray/tri_view.cc
+++ b/ash/system/tray/tri_view.cc
@@ -124,7 +124,10 @@ void TriView::SetContainerBorder(Container container,
}
void TriView::SetContainerVisible(Container container, bool visible) {
+ if (GetContainer(container)->visible() == visible)
+ return;
GetContainer(container)->SetVisible(visible);
+ Layout();
}
void TriView::SetFlexForContainer(Container container, int flex) {
« no previous file with comments | « ash/system/tray/tri_view.h ('k') | ash/system/tray/tri_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698