| Index: views/controls/single_split_view.cc
|
| ===================================================================
|
| --- views/controls/single_split_view.cc (revision 20254)
|
| +++ views/controls/single_split_view.cc (working copy)
|
| @@ -21,7 +21,8 @@
|
| View* trailing,
|
| Orientation orientation)
|
| : is_horizontal_(orientation == HORIZONTAL_SPLIT),
|
| - divider_offset_(-1) {
|
| + divider_offset_(-1),
|
| + resize_leading_on_bounds_change_(true) {
|
| AddChildView(leading);
|
| AddChildView(trailing);
|
| #if defined(OS_WIN)
|
| @@ -31,6 +32,20 @@
|
| #endif
|
| }
|
|
|
| +void SingleSplitView::DidChangeBounds(const gfx::Rect& previous,
|
| + const gfx::Rect& current) {
|
| + if (resize_leading_on_bounds_change_) {
|
| + if (is_horizontal_)
|
| + divider_offset_ += current.width() - previous.width();
|
| + else
|
| + divider_offset_ += current.height() - previous.height();
|
| +
|
| + if (divider_offset_ < 0)
|
| + divider_offset_ = kDividerSize;
|
| + }
|
| + View::DidChangeBounds(previous, current);
|
| +}
|
| +
|
| void SingleSplitView::Layout() {
|
| if (GetChildViewCount() != 2)
|
| return;
|
|
|