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

Unified Diff: ui/message_center/views/notifier_settings_view.cc

Issue 2555213004: Improving the appearance of overlay scrollbars (Closed)
Patch Set: attempt to fix mac Created 4 years 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
Index: ui/message_center/views/notifier_settings_view.cc
diff --git a/ui/message_center/views/notifier_settings_view.cc b/ui/message_center/views/notifier_settings_view.cc
index e4ecb9887dd506254f89e3e5e5f797ed408aad72..d27e03a5a40fe4af66c6eb540d648f1e8282dc81 100644
--- a/ui/message_center/views/notifier_settings_view.cc
+++ b/ui/message_center/views/notifier_settings_view.cc
@@ -442,6 +442,7 @@ NotifierSettingsView::NotifierSettingsView(NotifierSettingsProvider* provider)
scroller_ = new views::ScrollView();
scroller_->SetVerticalScrollBar(new views::OverlayScrollBar(false));
+ scroller_->SetHorizontalScrollBar(new views::OverlayScrollBar(true));
AddChildView(scroller_);
std::vector<Notifier*> notifiers;
@@ -570,7 +571,7 @@ void NotifierSettingsView::Layout() {
int content_width = width();
int content_height = contents_view->GetHeightForWidth(content_width);
if (title_height + content_height > height()) {
- content_width -= scroller_->GetScrollBarWidth();
+ content_width -= scroller_->GetScrollBarLayoutWidth();
content_height = contents_view->GetHeightForWidth(content_width);
}
contents_view->SetBounds(0, 0, content_width, content_height);
@@ -582,7 +583,7 @@ gfx::Size NotifierSettingsView::GetMinimumSize() const {
int total_height = title_label_->GetPreferredSize().height() +
scroller_->contents()->GetPreferredSize().height();
if (total_height > kMinimumHeight)
- size.Enlarge(scroller_->GetScrollBarWidth(), 0);
+ size.Enlarge(scroller_->GetScrollBarLayoutWidth(), 0);
return size;
}

Powered by Google App Engine
This is Rietveld 408576698