Commit 4f79e19d authored by estade's avatar estade Committed by Commit bot

Use overlay scrollbars by default in CrOS native UI.

BUG=672199

Review-Url: https://codereview.chromium.org/2558173006
Cr-Commit-Position: refs/heads/master@{#438730}
parent 4a1a19f6
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "ash/common/system/tray/fixed_sized_scroll_view.h" #include "ash/common/system/tray/fixed_sized_scroll_view.h"
#include "ash/common/material_design/material_design_controller.h" #include "ash/common/material_design/material_design_controller.h"
#include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
namespace ash { namespace ash {
...@@ -19,10 +18,6 @@ bool UseMd() { ...@@ -19,10 +18,6 @@ bool UseMd() {
FixedSizedScrollView::FixedSizedScrollView() { FixedSizedScrollView::FixedSizedScrollView() {
set_notify_enter_exit_on_child(true); set_notify_enter_exit_on_child(true);
if (UseMd()) {
SetVerticalScrollBar(new views::OverlayScrollBar(false));
SetHorizontalScrollBar(new views::OverlayScrollBar(true));
}
} }
FixedSizedScrollView::~FixedSizedScrollView() {} FixedSizedScrollView::~FixedSizedScrollView() {}
......
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
#include "ui/views/controls/focusable_border.h" #include "ui/views/controls/focusable_border.h"
#include "ui/views/controls/scrollbar/scroll_bar_views.h" #include "ui/views/controls/scrollbar/scroll_bar_views.h"
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "ui/views/controls/scrollbar/overlay_scroll_bar.h"
#elif defined(OS_LINUX)
#define DESKTOP_LINUX #define DESKTOP_LINUX
#endif #endif
...@@ -56,7 +58,11 @@ gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled, ...@@ -56,7 +58,11 @@ gfx::ImageSkia PlatformStyle::CreateComboboxArrow(bool is_enabled,
// static // static
std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) { std::unique_ptr<ScrollBar> PlatformStyle::CreateScrollBar(bool is_horizontal) {
#if defined(OS_CHROMEOS)
return base::MakeUnique<OverlayScrollBar>(is_horizontal);
#else
return base::MakeUnique<ScrollBarViews>(is_horizontal); return base::MakeUnique<ScrollBarViews>(is_horizontal);
#endif
} }
// static // static
......
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