Chromium Code Reviews| Index: ash/wm/default_state.cc |
| diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc |
| index 61a3dc6b09120e7fcb0529e2ee51659898c6b010..7082b4170c8bc33bbb459512967ac98afff618eb 100644 |
| --- a/ash/wm/default_state.cc |
| +++ b/ash/wm/default_state.cc |
| @@ -31,6 +31,11 @@ namespace { |
| // must be visible when the window is added to the workspace. |
| const float kMinimumPercentOnScreenArea = 0.3f; |
| +// When a window that has restore bounds at least as large as a work area is |
| +// unmaximized inset the bounds slightly so that they are not exactly same. This |
|
msw
2015/06/05 17:20:51
nit: comma here: "unmaximized," and "exactly the s
varkha
2015/06/05 17:55:28
Done.
|
| +// makes it easier to resize the window. |
| +const int kMaximizedWindowInset = 10; // Pixels. |
| + |
| bool IsMinimizedWindowState(const WindowStateType state_type) { |
| return state_type == WINDOW_STATE_TYPE_MINIMIZED || |
| state_type == WINDOW_STATE_TYPE_DOCKED_MINIMIZED; |
| @@ -646,7 +651,8 @@ void DefaultState::UpdateBoundsFromState(WindowState* window_state, |
| // Inset the bounds slightly so that they are not exactly same as |
| // the work area bounds and it is easier to resize the window. |
| bounds_in_parent = work_area_in_parent; |
| - bounds_in_parent.Inset(10, 10, 10, 10); |
| + bounds_in_parent.Inset(kMaximizedWindowInset, kMaximizedWindowInset, |
| + kMaximizedWindowInset, kMaximizedWindowInset); |
| } |
| } else { |
| bounds_in_parent = window->bounds(); |