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

Side by Side Diff: ash/wm/frame_painter.cc

Issue 12313153: Add minimize button assets for panel windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « ash/resources/default_200_percent/common/window_minimize_short_pressed.png ('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) 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 "ash/wm/frame_painter.h" 5 #include "ash/wm/frame_painter.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // The new assets only make sense if the window is actually maximized or 503 // The new assets only make sense if the window is actually maximized or
504 // fullscreen. 504 // fullscreen.
505 if (shorter_layout && 505 if (shorter_layout &&
506 (frame_->IsMaximized() || frame_->IsFullscreen()) && 506 (frame_->IsMaximized() || frame_->IsFullscreen()) &&
507 GetTrackedByWorkspace(frame_->GetNativeWindow())) { 507 GetTrackedByWorkspace(frame_->GetNativeWindow())) {
508 SetButtonImages(close_button_, 508 SetButtonImages(close_button_,
509 IDR_AURA_WINDOW_MAXIMIZED_CLOSE2, 509 IDR_AURA_WINDOW_MAXIMIZED_CLOSE2,
510 IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H, 510 IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_H,
511 IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P); 511 IDR_AURA_WINDOW_MAXIMIZED_CLOSE2_P);
512 // The chat window cannot be restored but only minimized. 512 // The chat window cannot be restored but only minimized.
513 // Case: (size_button_behavior_ == SIZE_BUTTON_MINIMIZES). We used to have 513 if (size_button_behavior_ == SIZE_BUTTON_MINIMIZES) {
514 // a special set of artwork to show this case, but per discussion we 514 SetButtonImages(size_button_,
515 // removed this. 515 IDR_AURA_WINDOW_MINIMIZE_SHORT,
516 SetButtonImages(size_button_, 516 IDR_AURA_WINDOW_MINIMIZE_SHORT_H,
517 IDR_AURA_WINDOW_MAXIMIZED_RESTORE2, 517 IDR_AURA_WINDOW_MINIMIZE_SHORT_P);
518 IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H, 518 } else {
519 IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P); 519 SetButtonImages(size_button_,
520 IDR_AURA_WINDOW_MAXIMIZED_RESTORE2,
521 IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_H,
522 IDR_AURA_WINDOW_MAXIMIZED_RESTORE2_P);
523 }
520 } else if (shorter_layout) { 524 } else if (shorter_layout) {
521 SetButtonImages(close_button_, 525 SetButtonImages(close_button_,
522 IDR_AURA_WINDOW_MAXIMIZED_CLOSE, 526 IDR_AURA_WINDOW_MAXIMIZED_CLOSE,
523 IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H, 527 IDR_AURA_WINDOW_MAXIMIZED_CLOSE_H,
524 IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P); 528 IDR_AURA_WINDOW_MAXIMIZED_CLOSE_P);
525 // The chat window cannot be restored but only minimized. 529 // The chat window cannot be restored but only minimized.
526 // Case: (size_button_behavior_ == SIZE_BUTTON_MINIMIZES). We used to have 530 if (size_button_behavior_ == SIZE_BUTTON_MINIMIZES) {
527 // a special set of artwork to show this case, but per discussion we 531 SetButtonImages(size_button_,
528 // removed this. 532 IDR_AURA_WINDOW_MINIMIZE_SHORT,
529 SetButtonImages(size_button_, 533 IDR_AURA_WINDOW_MINIMIZE_SHORT_H,
530 IDR_AURA_WINDOW_MAXIMIZED_RESTORE, 534 IDR_AURA_WINDOW_MINIMIZE_SHORT_P);
531 IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H, 535 } else {
532 IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P); 536 SetButtonImages(size_button_,
537 IDR_AURA_WINDOW_MAXIMIZED_RESTORE,
538 IDR_AURA_WINDOW_MAXIMIZED_RESTORE_H,
539 IDR_AURA_WINDOW_MAXIMIZED_RESTORE_P);
540 }
533 } else { 541 } else {
534 SetButtonImages(close_button_, 542 SetButtonImages(close_button_,
535 IDR_AURA_WINDOW_CLOSE, 543 IDR_AURA_WINDOW_CLOSE,
536 IDR_AURA_WINDOW_CLOSE_H, 544 IDR_AURA_WINDOW_CLOSE_H,
537 IDR_AURA_WINDOW_CLOSE_P); 545 IDR_AURA_WINDOW_CLOSE_P);
538 SetButtonImages(size_button_, 546 SetButtonImages(size_button_,
539 IDR_AURA_WINDOW_MAXIMIZE, 547 IDR_AURA_WINDOW_MAXIMIZE,
540 IDR_AURA_WINDOW_MAXIMIZE_H, 548 IDR_AURA_WINDOW_MAXIMIZE_H,
541 IDR_AURA_WINDOW_MAXIMIZE_P); 549 IDR_AURA_WINDOW_MAXIMIZE_P);
542 } 550 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 int title_y = 839 int title_y =
832 (view->GetBoundsForClientView().y() - title_font.GetHeight()) / 2; 840 (view->GetBoundsForClientView().y() - title_font.GetHeight()) / 2;
833 return gfx::Rect( 841 return gfx::Rect(
834 title_x, 842 title_x,
835 std::max(0, title_y), 843 std::max(0, title_y),
836 std::max(0, size_button_->x() - kTitleLogoSpacing - title_x), 844 std::max(0, size_button_->x() - kTitleLogoSpacing - title_x),
837 title_font.GetHeight()); 845 title_font.GetHeight());
838 } 846 }
839 847
840 } // namespace ash 848 } // namespace ash
OLDNEW
« no previous file with comments | « ash/resources/default_200_percent/common/window_minimize_short_pressed.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698