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

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

Issue 11748023: M26 new bluetooth UI. List all bluetooth devices in detailed view and automatically discover all BT… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and nit. Created 7 years, 11 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/tray_details_view.h ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_details_view.cc
diff --git a/ash/system/tray/tray_details_view.cc b/ash/system/tray/tray_details_view.cc
index 6a9f4157062df32a2303c941112572bf40350714..44f214f6d2474c766562086ff82060f5533db82f 100644
--- a/ash/system/tray/tray_details_view.cc
+++ b/ash/system/tray/tray_details_view.cc
@@ -15,6 +15,24 @@
namespace ash {
namespace internal {
+class ScrollSeparator : public views::View {
+ public:
+ ScrollSeparator() {}
+
+ virtual ~ScrollSeparator() {}
+
+ private:
+ // Overriden from views::View.
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
+ canvas->FillRect(gfx::Rect(0, height() / 2, width(), 1), kBorderLightColor);
+ }
+ virtual gfx::Size GetPreferredSize() OVERRIDE {
+ return gfx::Size(1, kTrayPopupScrollSeparatorHeight);
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(ScrollSeparator);
+};
+
class ScrollBorder : public views::Border {
public:
ScrollBorder() {}
@@ -77,6 +95,14 @@ void TrayDetailsView::CreateScrollableList() {
AddChildView(scroller_);
}
+void TrayDetailsView::AddScrollSeparator() {
+ DCHECK(scroll_content_);
+ // Do not draw the separator if it is the very first item
+ // in the scrollable list.
+ if (scroll_content_->has_children())
+ scroll_content_->AddChildView(new ScrollSeparator);
+}
+
void TrayDetailsView::Reset() {
RemoveAllChildViews(true);
footer_ = NULL;
« no previous file with comments | « ash/system/tray/tray_details_view.h ('k') | ash/system/tray/tray_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698