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

Side by Side Diff: chrome/browser/ui/views/panels/panel_frame_view.cc

Issue 19115003: Make the maximize button more easily hittable when there is a huge amount of tabs present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed completely Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/panels/panel_frame_view.h" 5 #include "chrome/browser/ui/views/panels/panel_frame_view.h"
6 6
7 #include "chrome/browser/ui/panels/panel.h" 7 #include "chrome/browser/ui/panels/panel.h"
8 #include "chrome/browser/ui/panels/panel_constants.h" 8 #include "chrome/browser/ui/panels/panel_constants.h"
9 #include "chrome/browser/ui/views/panels/panel_view.h" 9 #include "chrome/browser/ui/views/panels/panel_view.h"
10 #include "chrome/browser/ui/views/tab_icon_view.h" 10 #include "chrome/browser/ui/views/tab_icon_view.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 int titlebar_height = TitlebarHeight(); 409 int titlebar_height = TitlebarHeight();
410 int border_thickness = BorderThickness(); 410 int border_thickness = BorderThickness();
411 // The window bounds include both client area and non-client area (titlebar 411 // The window bounds include both client area and non-client area (titlebar
412 // and left, right and bottom borders). 412 // and left, right and bottom borders).
413 return gfx::Rect(client_bounds.x() - border_thickness, 413 return gfx::Rect(client_bounds.x() - border_thickness,
414 client_bounds.y() - titlebar_height, 414 client_bounds.y() - titlebar_height,
415 client_bounds.width() + border_thickness * 2, 415 client_bounds.width() + border_thickness * 2,
416 client_bounds.height() + titlebar_height + border_thickness); 416 client_bounds.height() + titlebar_height + border_thickness);
417 } 417 }
418 418
419 int PanelFrameView::NonClientHitTest(const gfx::Point& point) { 419 int PanelFrameView::NonClientHitTest(const gfx::Point& point) const {
420 panel::Resizability resizability = panel_view_->panel()->CanResizeByMouse(); 420 panel::Resizability resizability = panel_view_->panel()->CanResizeByMouse();
421 421
422 // Check the frame first, as we allow a small area overlapping the contents 422 // Check the frame first, as we allow a small area overlapping the contents
423 // to be used for resize handles. 423 // to be used for resize handles.
424 int frame_component = GetFrameEdgeHitTest( 424 int frame_component = GetFrameEdgeHitTest(
425 point, size(), PanelView::kResizeInsideBoundsSize, resizability); 425 point, size(), PanelView::kResizeInsideBoundsSize, resizability);
426 426
427 if (frame_component != HTNOWHERE) 427 if (frame_component != HTNOWHERE)
428 return frame_component; 428 return frame_component;
429 429
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 761
762 // Draw the left border. 762 // Draw the left border.
763 canvas->TileImageInt(left_image, 763 canvas->TileImageInt(left_image,
764 0, 764 0,
765 top_left_image.height(), 765 top_left_image.height(),
766 left_image.width(), 766 left_image.width(),
767 height() - top_left_image.height() - 767 height() - top_left_image.height() -
768 bottom_left_image.height()); 768 bottom_left_image.height());
769 #endif 769 #endif
770 } 770 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698