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

Side by Side Diff: apps/ui/views/app_window_frame_view.h

Issue 274013002: Use light images in colored app frames, when the frame color is dark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « no previous file | apps/ui/views/app_window_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ 5 #ifndef APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_
6 #define APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ 6 #define APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual void Layout() OVERRIDE; 81 virtual void Layout() OVERRIDE;
82 virtual const char* GetClassName() const OVERRIDE; 82 virtual const char* GetClassName() const OVERRIDE;
83 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 83 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
84 virtual gfx::Size GetMinimumSize() OVERRIDE; 84 virtual gfx::Size GetMinimumSize() OVERRIDE;
85 virtual gfx::Size GetMaximumSize() OVERRIDE; 85 virtual gfx::Size GetMaximumSize() OVERRIDE;
86 86
87 // views::ButtonListener implementation. 87 // views::ButtonListener implementation.
88 virtual void ButtonPressed(views::Button* sender, 88 virtual void ButtonPressed(views::Button* sender,
89 const ui::Event& event) OVERRIDE; 89 const ui::Event& event) OVERRIDE;
90 90
91 // Some button images we use depend on the color of the frame. This
92 // will set these images based on the color of the frame.
93 void SetButtonImagesForFrame();
94
95 // Return the current frame color based on the active state of the window.
96 SkColor CurrentFrameColor();
97
91 views::Widget* widget_; 98 views::Widget* widget_;
92 NativeAppWindow* window_; 99 NativeAppWindow* window_;
93 bool draw_frame_; 100 bool draw_frame_;
94 SkColor active_frame_color_; 101 SkColor active_frame_color_;
95 SkColor inactive_frame_color_; 102 SkColor inactive_frame_color_;
96 views::ImageButton* close_button_; 103 views::ImageButton* close_button_;
97 views::ImageButton* maximize_button_; 104 views::ImageButton* maximize_button_;
98 views::ImageButton* restore_button_; 105 views::ImageButton* restore_button_;
99 views::ImageButton* minimize_button_; 106 views::ImageButton* minimize_button_;
100 107
101 // Allow resize for clicks this many pixels inside the bounds. 108 // Allow resize for clicks this many pixels inside the bounds.
102 int resize_inside_bounds_size_; 109 int resize_inside_bounds_size_;
103 110
104 // Allow resize for clicks this many pixels outside the bounds. 111 // Allow resize for clicks this many pixels outside the bounds.
105 int resize_outside_bounds_size_; 112 int resize_outside_bounds_size_;
106 113
107 // Size in pixels of the lower-right corner resize handle. 114 // Size in pixels of the lower-right corner resize handle.
108 int resize_area_corner_size_; 115 int resize_area_corner_size_;
109 116
110 DISALLOW_COPY_AND_ASSIGN(AppWindowFrameView); 117 DISALLOW_COPY_AND_ASSIGN(AppWindowFrameView);
111 }; 118 };
112 119
113 } // namespace apps 120 } // namespace apps
114 121
115 #endif // APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_ 122 #endif // APPS_UI_VIEWS_APP_WINDOW_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | apps/ui/views/app_window_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698