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

Unified Diff: ui/views/controls/single_split_view.cc

Issue 12013004: alternate ntp: unpinned bookmark bar in ntp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « ui/views/controls/single_split_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/single_split_view.cc
diff --git a/ui/views/controls/single_split_view.cc b/ui/views/controls/single_split_view.cc
index fabcd10961b432314280417bc06a592c7d9e6bb1..33a03bdafdb4308d9aec94824d5e49f811fcfa17 100644
--- a/ui/views/controls/single_split_view.cc
+++ b/ui/views/controls/single_split_view.cc
@@ -30,8 +30,7 @@ SingleSplitView::SingleSplitView(View* leading,
: is_horizontal_(orientation == HORIZONTAL_SPLIT),
divider_offset_(-1),
resize_leading_on_bounds_change_(true),
- listener_(listener),
- leading_bottom_offset_(0) {
+ listener_(listener) {
AddChildView(leading);
AddChildView(trailing);
#if defined(OS_WIN)
@@ -139,8 +138,7 @@ void SingleSplitView::CalculateChildrenBounds(
std::max(0, bounds.width() - divider_at - divider_size),
bounds.height());
} else {
- *leading_bounds = gfx::Rect(
- 0, 0, bounds.width(), divider_at - leading_bottom_offset_);
+ *leading_bounds = gfx::Rect(0, 0, bounds.width(), divider_at);
*trailing_bounds =
gfx::Rect(0, divider_at + divider_size, bounds.width(),
std::max(0, bounds.height() - divider_at - divider_size));
@@ -151,13 +149,6 @@ void SingleSplitView::SetAccessibleName(const string16& name) {
accessible_name_ = name;
}
-void SingleSplitView::SetLeadingBottomOffset(int offset) {
- if (leading_bottom_offset_ == offset)
- return;
- leading_bottom_offset_ = offset;
- InvalidateLayout();
-}
-
bool SingleSplitView::OnMousePressed(const ui::MouseEvent& event) {
if (!IsPointInDivider(event.location()))
return false;
@@ -177,8 +168,7 @@ bool SingleSplitView::OnMouseDragged(const ui::MouseEvent& event) {
delta_offset *= -1;
// Honor the minimum size when resizing.
gfx::Size min = child_at(0)->GetMinimumSize();
- int new_size = std::max(GetPrimaryAxisSize(min.width(),
- min.height() + leading_bottom_offset_),
+ int new_size = std::max(GetPrimaryAxisSize(min.width(), min.height()),
drag_info_.initial_divider_offset + delta_offset);
// And don't let the view get bigger than our width.
@@ -220,8 +210,7 @@ bool SingleSplitView::IsPointInDivider(const gfx::Point& p) {
divider_relative_offset =
p.x() - child_at(base::i18n::IsRTL() ? 1 : 0)->width();
} else {
- divider_relative_offset =
- p.y() - (child_at(0)->height() + leading_bottom_offset_);
+ divider_relative_offset = p.y() - child_at(0)->height();
}
return (divider_relative_offset >= 0 &&
divider_relative_offset < kDividerSize);
« no previous file with comments | « ui/views/controls/single_split_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698