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

Side by Side Diff: ui/views/window/custom_frame_view.cc

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland - WHAT HERE could have broken media_unittests???? Created 9 years 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
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/window/custom_frame_view.h" 5 #include "ui/views/window/custom_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 canvas->TileImageInt(*bottom, client_area_bounds.x(), client_area_bottom, 477 canvas->TileImageInt(*bottom, client_area_bounds.x(), client_area_bottom,
478 client_area_bounds.width(), bottom_right->height()); 478 client_area_bounds.width(), bottom_right->height());
479 canvas->DrawBitmapInt(*bottom_left, 479 canvas->DrawBitmapInt(*bottom_left,
480 client_area_bounds.x() - bottom_left->width(), client_area_bottom); 480 client_area_bounds.x() - bottom_left->width(), client_area_bottom);
481 481
482 // Left. 482 // Left.
483 canvas->TileImageInt(*left, client_area_bounds.x() - left->width(), 483 canvas->TileImageInt(*left, client_area_bounds.x() - left->width(),
484 client_area_top, left->width(), client_area_height); 484 client_area_top, left->width(), client_area_height);
485 485
486 // Draw the toolbar color to fill in the edges. 486 // Draw the toolbar color to fill in the edges.
487 canvas->DrawRectInt(ResourceBundle::toolbar_color, 487 canvas->DrawRect(gfx::Rect(client_area_bounds.x() - 1, client_area_top - 1,
488 client_area_bounds.x() - 1, client_area_top - 1, 488 client_area_bounds.width() + 1,
489 client_area_bounds.width() + 1, client_area_bottom - client_area_top + 1); 489 client_area_bottom - client_area_top + 1),
490 ui::ResourceBundle::toolbar_color);
490 } 491 }
491 492
492 void CustomFrameView::LayoutWindowControls() { 493 void CustomFrameView::LayoutWindowControls() {
493 close_button_->SetImageAlignment(ImageButton::ALIGN_LEFT, 494 close_button_->SetImageAlignment(ImageButton::ALIGN_LEFT,
494 ImageButton::ALIGN_BOTTOM); 495 ImageButton::ALIGN_BOTTOM);
495 int caption_y = CaptionButtonY(); 496 int caption_y = CaptionButtonY();
496 bool is_maximized = frame_->IsMaximized(); 497 bool is_maximized = frame_->IsMaximized();
497 // There should always be the same number of non-shadow pixels visible to the 498 // There should always be the same number of non-shadow pixels visible to the
498 // side of the caption buttons. In maximized mode we extend the rightmost 499 // side of the caption buttons. In maximized mode we extend the rightmost
499 // button to the screen corner to obey Fitts' Law. 500 // button to the screen corner to obey Fitts' Law.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont()); 597 title_font_ = new gfx::Font(NativeWidgetWin::GetWindowTitleFont());
597 #elif defined(OS_LINUX) 598 #elif defined(OS_LINUX)
598 // TODO(ben): need to resolve what font this is. 599 // TODO(ben): need to resolve what font this is.
599 title_font_ = new gfx::Font(); 600 title_font_ = new gfx::Font();
600 #endif 601 #endif
601 initialized = true; 602 initialized = true;
602 } 603 }
603 } 604 }
604 605
605 } // namespace views 606 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698