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

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

Issue 2453133002: [ash-md] Makes Wi-Fi header row sticky when network list is scrolled (Closed)
Patch Set: [ash-md] Makes Wi-Fi header row sticky when network list is scrolled (back to range) 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/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 c5a5bfbb4cdda6c4bfd8d277d733274f08e20412..ed362bcc92ac2090c1f8c4a2f8f87a192ead0779 100644
--- a/ash/common/system/chromeos/network/network_list_md.cc
+++ b/ash/common/system/chromeos/network/network_list_md.cc
@@ -10,6 +10,7 @@
#include "ash/common/system/chromeos/network/network_icon_animation.h"
#include "ash/common/system/chromeos/network/network_info.h"
#include "ash/common/system/chromeos/network/network_list_delegate.h"
+#include "ash/common/system/tray/tray_constants.h"
#include "base/memory/ptr_util.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager/power_supply_properties.pb.h"
@@ -27,6 +28,7 @@
#include "ui/gfx/font.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons_public.h"
+#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/toggle_button.h"
@@ -46,16 +48,14 @@ namespace ash {
namespace {
+// TODO(varkha): Merge some of those those constants in tray_constants.h
const int kWiFiButtonSize = 48;
const int kWifiRowVerticalInset = 4;
const int kWifiRowLeftInset = 18;
const int kWifiRowRightInset = 14;
-const int kWifiRowSeparatorThickness = 1;
const int kWifiRowChildSpacing = 14;
const int kFocusBorderInset = 1;
-const SkColor kWifiRowSeparatorColor = SkColorSetA(SK_ColorBLACK, 0x1F);
-
bool IsProhibitedByPolicy(const chromeos::NetworkState* network) {
if (!NetworkTypePattern::WiFi().MatchesType(network->type()))
return false;
@@ -116,11 +116,13 @@ class NetworkListViewMd::WifiHeaderRowView : public views::View {
return GetPreferredSize().height();
}
+ const char* GetClassName() const override { return "WifiHeaderRowView"; }
+
private:
void Init() {
+ set_id(kHeaderRowId);
+ set_background(views::Background::CreateSolidBackground(kBackgroundColor));
// TODO(tdanderson): Need to unify this with the generic menu row class.
- SetBorder(views::Border::CreateSolidSidedBorder(
- kWifiRowSeparatorThickness, 0, 0, 0, kWifiRowSeparatorColor));
views::View* container = new views::View;
container->SetBorder(views::Border::CreateEmptyBorder(
0, kWifiRowLeftInset, 0, kWifiRowRightInset));
« no previous file with comments | « no previous file | ash/common/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698