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

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

Issue 2506133003: [ash-md] Allows ToggleButton to have a border and adds focus rectangle (Closed)
Patch Set: [ash-md] Allows ToggleButton to have a border and adds focus rectangle (rebase) 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 | « ash/common/system/chromeos/ime_menu/ime_list_view.cc ('k') | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/network_list_md.cc
diff --git a/ash/common/system/chromeos/network/network_list_md.cc b/ash/common/system/chromeos/network/network_list_md.cc
index 09dc70776ad3dfb6419779b3bd74f2fc605e8dd9..1470a769a6e11b7ed93db60e6e6ba36e398679cb 100644
--- a/ash/common/system/chromeos/network/network_list_md.cc
+++ b/ash/common/system/chromeos/network/network_list_md.cc
@@ -51,8 +51,6 @@ namespace {
const int kSectionHeaderRowSize = 48;
const int kSectionHeaderRowVerticalInset = 4;
const int kSectionHeaderRowLeftInset = 18;
-const int kSectionHeaderRowRightInset = 14;
-const int kSectionHeaderRowChildSpacing = 14;
bool IsProhibitedByPolicy(const chromeos::NetworkState* network) {
if (!NetworkTypePattern::WiFi().MatchesType(network->type()))
@@ -134,14 +132,14 @@ class NetworkListViewMd::SectionHeaderRowView : public views::View,
// https://crbug.com/614453.
TrayPopupUtils::ConfigureAsStickyHeader(this);
container_ = new views::View;
- container_->SetBorder(views::CreateEmptyBorder(
- 0, kSectionHeaderRowLeftInset, 0, kSectionHeaderRowRightInset));
+ container_->SetBorder(
+ views::CreateEmptyBorder(0, kSectionHeaderRowLeftInset, 0, 0));
views::FillLayout* layout = new views::FillLayout;
SetLayoutManager(layout);
AddChildView(container_);
- views::BoxLayout* container_layout = new views::BoxLayout(
- views::BoxLayout::kHorizontal, 0, 0, kSectionHeaderRowChildSpacing);
+ views::BoxLayout* container_layout =
+ new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
container_layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_CENTER);
container_->SetLayoutManager(container_layout);
@@ -160,12 +158,8 @@ class NetworkListViewMd::SectionHeaderRowView : public views::View,
}
void AddToggleButton(bool enabled) {
- toggle_ = new views::ToggleButton(this);
- toggle_->SetAccessibleName(l10n_util::GetStringUTF16(title_id_));
+ toggle_ = TrayPopupUtils::CreateToggleButton(this, title_id_);
toggle_->SetIsOn(enabled, false);
- // TODO(varkha): Implement focus painter for toggle. See
- // https://crbug.com/652677 for context.
- toggle_->SetFocusForPlatform();
container_->AddChildView(toggle_);
}
« no previous file with comments | « ash/common/system/chromeos/ime_menu/ime_list_view.cc ('k') | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698