diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 20:28:25 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-26 20:28:25 +0000 |
commit | b4f5916b698aa02705fe45e5cdf27ed04bc2b325 (patch) | |
tree | 758787f379735e38b77ad4b83b69822b7da14ebb /chrome/views/non_client_view.h | |
parent | f0c33d8b99d25a575e025db8ffe69d58187b9566 (diff) | |
download | chromium_src-b4f5916b698aa02705fe45e5cdf27ed04bc2b325.zip chromium_src-b4f5916b698aa02705fe45e5cdf27ed04bc2b325.tar.gz chromium_src-b4f5916b698aa02705fe45e5cdf27ed04bc2b325.tar.bz2 |
This change should have few user-visible effects. I think I slightly modified the window layout (by a pixel or so) in the popup window case, which I haven't tried to make pixel-perfect yet anyway. Otherwise it's all reorg.
Clean up logic of nonclient view to be more consistent and coherent. Most things are now based on a small set of core functions that return various frame/nonclient thicknesses. This allows a noticeable reduction in the number of hardcoded constants, makes the code make more sense (even though a few places are longer than before), and makes it much easier to do things in the future like resizing various borders or handling system metrics better.
Rename and update comments for all constants to be more descriptive and less redundant.
Rename helper functions and variables for consistency, now that they've changed.
Remove an unused variant of TileImageInt(). Add a new one that takes an offset into the source image. This is used to rewrite the maximized bottom border tiling call in a way that doesn't rely on someone else clipping out or painting over the overdraw from tiling "too large" a source image. Probably no visible effect.
Make resize border hittest helper function able to handle borders of varying widths, and try to make parameter names more meaningful. Technically, we don't need the extra flexibility, since our bottom and side borders are the same thickness, but since there are different functions calculating that thickness on the caller side, it didn't hurt to not rely on that for the future.
BUG=5054
Review URL: http://codereview.chromium.org/18804
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/non_client_view.h')
-rw-r--r-- | chrome/views/non_client_view.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/views/non_client_view.h b/chrome/views/non_client_view.h index d8de9ea..3643bbe 100644 --- a/chrome/views/non_client_view.h +++ b/chrome/views/non_client_view.h @@ -75,9 +75,10 @@ class NonClientView : public View { // the size of the sizing edges, and whether or not the window can be // resized. int GetHTComponentForFrame(const gfx::Point& point, - int resize_area_size, - int resize_area_corner_size, - int top_resize_area_size, + int top_resize_border_height, + int resize_border_width, + int bottom_resize_border_height, + int resize_corner_size, bool can_resize); // Accessor for paint_as_active_. |