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

Unified Diff: views/controls/single_split_view.h

Issue 155214: Add 'preserve trailing view size' capability into the SingleSplitView.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/browser/views/bookmark_manager_view.cc ('k') | views/controls/single_split_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/single_split_view.h
===================================================================
--- views/controls/single_split_view.h (revision 20254)
+++ views/controls/single_split_view.h (working copy)
@@ -20,6 +20,9 @@
SingleSplitView(View* leading, View* trailing, Orientation orientation);
+ virtual void DidChangeBounds(const gfx::Rect& previous,
+ const gfx::Rect& current);
+
virtual void Layout();
// SingleSplitView's preferred size is the sum of the preferred widths
@@ -36,6 +39,13 @@
}
int divider_offset() { return divider_offset_; }
+ // Sets whether the leading component is resized when the split views size
+ // changes. The default is true. A value of false results in the trailing
+ // component resizing on a bounds change.
+ void set_resize_leading_on_bounds_change(bool resize) {
+ resize_leading_on_bounds_change_ = resize;
+ }
+
protected:
virtual bool OnMousePressed(const MouseEvent& event);
virtual bool OnMouseDragged(const MouseEvent& event);
@@ -70,6 +80,8 @@
// Position of the divider.
int divider_offset_;
+ bool resize_leading_on_bounds_change_;
+
DISALLOW_COPY_AND_ASSIGN(SingleSplitView);
};
« no previous file with comments | « chrome/browser/views/bookmark_manager_view.cc ('k') | views/controls/single_split_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698