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

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

Issue 2512883002: [Chrome OS MD] Update Cast and VPN to follow MD layout (Closed)
Patch Set: address comments, thanks @tdanderson Created 4 years, 1 month 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 | ash/common/system/chromeos/screen_security/screen_tray_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9831cfc997863877baf098c776b14ff74976d8db..6498072682f189adf94f0193cf0866654936f1c5 100644
--- a/ash/common/system/chromeos/network/vpn_list_view.cc
+++ b/ash/common/system/chromeos/network/vpn_list_view.cc
@@ -197,7 +197,8 @@ class VPNListNetworkEntry : public VPNListEntryBase,
VPNListEntryBase::VPNListEntryBase(VPNListView* parent)
: HoverHighlightView(parent) {
- SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0));
+ if (!UseMd())
+ SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0));
}
VPNListNetworkEntry::VPNListNetworkEntry(VPNListView* parent,
@@ -287,22 +288,19 @@ void VPNListNetworkEntry::UpdateFromNetworkState(
if (UseMd()) {
disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton(
this, l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT));
- } else {
- disconnect_button_ = new DisconnectButton(this);
- }
- if (UseMd()) {
- DCHECK(tri_view());
tri_view()->AddView(TriView::Container::END, disconnect_button_);
tri_view()->SetContainerVisible(TriView::Container::END, true);
+ tri_view()->SetContainerBorder(
+ TriView::Container::END,
+ views::CreateEmptyBorder(0, 0, 0, kTrayPopupButtonEndMargin));
} else {
+ disconnect_button_ = new DisconnectButton(this);
AddChildView(disconnect_button_);
+ SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 3));
}
-
- SetBorder(
- views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0,
- UseMd() ? kTrayPopupButtonEndMargin : 3));
} else {
- SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0));
+ if (!UseMd())
+ SetBorder(views::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 0, 0));
}
if (!UseMd()) {
« no previous file with comments | « no previous file | ash/common/system/chromeos/screen_security/screen_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698