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

Unified Diff: ash/common/system/chromeos/network/vpn_list_view.cc

Issue 2557333003: [ash-md] Stacks child layers properly for sticky header rows (Closed)
Patch Set: [ash-md] Stacks child layers properly for sticky header rows (consider children first) Created 4 years 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
Index: ash/common/system/chromeos/network/vpn_list_view.cc
diff --git a/ash/common/system/chromeos/network/vpn_list_view.cc b/ash/common/system/chromeos/network/vpn_list_view.cc
index a66d03cac78fead0afe45be525d9334ba1316100..2b22a4fe103d1fe93661a9ea77a870ca9c7ac40f 100644
--- a/ash/common/system/chromeos/network/vpn_list_view.cc
+++ b/ash/common/system/chromeos/network/vpn_list_view.cc
@@ -112,21 +112,11 @@ class VPNListProviderEntryMd : public views::ButtonListener,
const std::string& name,
int button_accessible_name_id)
: parent_(parent) {
- // TODO(varkha): Make this a sticky section header.
+ TrayPopupUtils::ConfigureAsStickyHeader(this);
SetLayoutManager(new views::FillLayout);
TriView* tri_view = TrayPopupUtils::CreateSubHeaderRowView();
AddChildView(tri_view);
- // Sets up the border. When the provider header is the first item in the
- // list (i.e. when the list was empty before adding the provider row) there
- // is already |kMenuSeparatorVerticalPadding| padding at the top of the
- // scroll contents, so only add that padding when the list was not |empty|.
- // TODO(varkha): Delete this special handling when we allow the header to be
- // sticky and just use ConfigureAsStickyHeader() instead.
- tri_view->SetBorder(
- views::CreateEmptyBorder(top_item ? 0 : kMenuSeparatorVerticalPadding,
- 0, kMenuSeparatorVerticalPadding, 0));
-
views::Label* label = TrayPopupUtils::CreateDefaultLabel();
TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SUB_HEADER);
style.SetupLabel(label);
@@ -370,12 +360,6 @@ void VPNListView::Update() {
->GetVisibleNetworkListByType(chromeos::NetworkTypePattern::VPN(),
&networks);
- if (!networks.empty() && IsConnectedOrConnecting(networks.front())) {
- // If there is a connected or connecting network, show that network first.
- AddNetwork(networks.front());
- networks.erase(networks.begin());
- }
-
// Show all VPN providers and all networks that are currently disconnected.
AddProvidersAndNetworks(networks);
« no previous file with comments | « no previous file | ash/common/system/tray/tray_details_view.cc » ('j') | ash/common/system/tray/tray_details_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698