Commit 916133ff authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Remove overflow indicator in detailed views.

This CL removes overflow indicator in ScrollView in UnifiedSystemTray's
detailed views. As the corners are rounded, overflow indicator is not
shown properly.

TEST=manual
BUG=835733

Change-Id: I89e7e25a2529a354de9b258ba80697961e1c0745
Reviewed-on: https://chromium-review.googlesource.com/1075912
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562367}
parent 96d06ed0
......@@ -267,6 +267,7 @@ class ImeMenuListView : public ImeListView, public DetailedViewDelegate {
return native_theme->GetSystemColor(
ui::NativeTheme::kColorId_BubbleBackground);
}
bool IsOverflowIndicatorEnabled() const override { return true; }
protected:
void Layout() override {
......
......@@ -29,6 +29,9 @@ class DetailedViewDelegate {
// Get the background color of the detailed view.
virtual SkColor GetBackgroundColor(ui::NativeTheme* native_theme) = 0;
// Return true if overflow indicator of ScrollView is enabled.
virtual bool IsOverflowIndicatorEnabled() const = 0;
};
} // namespace ash
......
......@@ -48,4 +48,8 @@ void SystemTrayItemDetailedViewDelegate::DoTransitionToMainView() {
owner_->set_restore_focus(false);
}
bool SystemTrayItemDetailedViewDelegate::IsOverflowIndicatorEnabled() const {
return true;
}
} // namespace ash
......@@ -25,6 +25,7 @@ class ASH_EXPORT SystemTrayItemDetailedViewDelegate
void TransitionToMainView(bool restore_focus) override;
void CloseBubble() override;
SkColor GetBackgroundColor(ui::NativeTheme* native_theme) override;
bool IsOverflowIndicatorEnabled() const override;
private:
// Actually transitions to the main view. The actual transition is
......
......@@ -5,7 +5,6 @@
#include "ash/system/tray/tray_detailed_view.h"
#include "ash/ash_view_ids.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/detailed_view_delegate.h"
#include "ash/system/tray/hover_highlight_view.h"
......@@ -306,6 +305,8 @@ void TrayDetailedView::CreateScrollableList() {
DCHECK(!scroller_);
scroll_content_ = new ScrollContentsView();
scroller_ = new views::ScrollView;
scroller_->set_draw_overflow_indicator(
delegate_->IsOverflowIndicatorEnabled());
scroller_->SetContents(scroll_content_);
// TODO(varkha): Make the sticky rows work with EnableViewPortLayer().
scroller_->SetBackgroundColor(
......
......@@ -27,4 +27,8 @@ SkColor UnifiedDetailedViewDelegate::GetBackgroundColor(
return SK_ColorTRANSPARENT;
}
bool UnifiedDetailedViewDelegate::IsOverflowIndicatorEnabled() const {
return false;
}
} // namespace ash
......@@ -23,6 +23,7 @@ class UnifiedDetailedViewDelegate : public DetailedViewDelegate {
void TransitionToMainView(bool restore_focus) override;
void CloseBubble() override;
SkColor GetBackgroundColor(ui::NativeTheme* native_theme) override;
bool IsOverflowIndicatorEnabled() const override;
private:
UnifiedSystemTrayController* const tray_controller_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment