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

Unified Diff: ui/views/controls/scrollbar/base_scroll_bar.cc

Issue 2496643002: Implement Sebastien's overlay scrollbars for native UI (Views). (Closed)
Patch Set: clarify comment 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
Index: ui/views/controls/scrollbar/base_scroll_bar.cc
diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
index 82d852944b656dadf77f632a2663201039b3eb64..d395f00858dfb0dfa047731c6bbc2abbecbfedad 100644
--- a/ui/views/controls/scrollbar/base_scroll_bar.cc
+++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
@@ -407,8 +407,7 @@ void BaseScrollBar::Update(int viewport_size,
// content size multiplied by the height of the thumb track.
double ratio =
std::min(1.0, static_cast<double>(viewport_size) / contents_size_);
- int thumb_size = static_cast<int>(ratio * GetTrackSize());
- thumb_->SetSize(thumb_size);
+ thumb_->SetLength(static_cast<int>(ratio * GetTrackSize()));
int thumb_position = CalculateThumbPosition(contents_scroll_offset);
thumb_->SetPosition(thumb_position);

Powered by Google App Engine
This is Rietveld 408576698