| OLD | NEW |
| 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 "views/window/dialog_client_view.h" | 5 #include "views/window/dialog_client_view.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <uxtheme.h> | 9 #include <uxtheme.h> |
| 10 #include <vsstyle.h> | 10 #include <vsstyle.h> |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 HDC dc = canvas->BeginPlatformPaint(); | 427 HDC dc = canvas->BeginPlatformPaint(); |
| 428 SIZE gripper_size = { 0, 0 }; | 428 SIZE gripper_size = { 0, 0 }; |
| 429 gfx::NativeTheme::instance()->GetThemePartSize( | 429 gfx::NativeTheme::instance()->GetThemePartSize( |
| 430 gfx::NativeTheme::STATUS, dc, SP_GRIPPER, 1, NULL, TS_TRUE, | 430 gfx::NativeTheme::STATUS, dc, SP_GRIPPER, 1, NULL, TS_TRUE, |
| 431 &gripper_size); | 431 &gripper_size); |
| 432 | 432 |
| 433 // TODO(beng): (http://b/1085509) In "classic" rendering mode, there isn't | 433 // TODO(beng): (http://b/1085509) In "classic" rendering mode, there isn't |
| 434 // a theme-supplied gripper. We should probably improvise | 434 // a theme-supplied gripper. We should probably improvise |
| 435 // something, which would also require changing |gripper_size| | 435 // something, which would also require changing |gripper_size| |
| 436 // to have different default values, too... | 436 // to have different default values, too... |
| 437 size_box_bounds_ = GetLocalBounds(); | 437 size_box_bounds_ = GetContentsBounds(); |
| 438 size_box_bounds_.set_x(size_box_bounds_.right() - gripper_size.cx); | 438 size_box_bounds_.set_x(size_box_bounds_.right() - gripper_size.cx); |
| 439 size_box_bounds_.set_y(size_box_bounds_.bottom() - gripper_size.cy); | 439 size_box_bounds_.set_y(size_box_bounds_.bottom() - gripper_size.cy); |
| 440 RECT native_bounds = size_box_bounds_.ToRECT(); | 440 RECT native_bounds = size_box_bounds_.ToRECT(); |
| 441 gfx::NativeTheme::instance()->PaintStatusGripper( | 441 gfx::NativeTheme::instance()->PaintStatusGripper( |
| 442 dc, SP_PANE, 1, 0, &native_bounds); | 442 dc, SP_PANE, 1, 0, &native_bounds); |
| 443 canvas->EndPlatformPaint(); | 443 canvas->EndPlatformPaint(); |
| 444 #else | 444 #else |
| 445 NOTIMPLEMENTED(); | 445 NOTIMPLEMENTED(); |
| 446 // TODO(port): paint size box | 446 // TODO(port): paint size box |
| 447 #endif | 447 #endif |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 void DialogClientView::InitClass() { | 569 void DialogClientView::InitClass() { |
| 570 static bool initialized = false; | 570 static bool initialized = false; |
| 571 if (!initialized) { | 571 if (!initialized) { |
| 572 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 572 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 573 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); | 573 dialog_button_font_ = new gfx::Font(rb.GetFont(ResourceBundle::BaseFont)); |
| 574 initialized = true; | 574 initialized = true; |
| 575 } | 575 } |
| 576 } | 576 } |
| 577 | 577 |
| 578 } // namespace views | 578 } // namespace views |
| OLD | NEW |