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

Side by Side Diff: chrome/browser/chromeos/status/status_area_button.cc

Issue 8930001: Fix up status area clock code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
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 "chrome/browser/chromeos/status/status_area_button.h" 5 #include "chrome/browser/chromeos/status/status_area_button.h"
6 6
7 #include "grit/theme_resources.h" 7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/skbitmap_operations.h" 10 #include "ui/gfx/skbitmap_operations.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 bool StatusAreaButton::HitTest(const gfx::Point& l) const { 123 bool StatusAreaButton::HitTest(const gfx::Point& l) const {
124 // BrowserFrameViewChromeos adds a few pixels of pad to the top of the 124 // BrowserFrameViewChromeos adds a few pixels of pad to the top of the
125 // status area. For mouse events in this area to activate the button, 125 // status area. For mouse events in this area to activate the button,
126 // hit testing need to be successful. We do this by clamping y to the 126 // hit testing need to be successful. We do this by clamping y to the
127 // position of the menu button view. 127 // position of the menu button view.
128 gfx::Point point(l.x(), std::max(y(), l.y())); 128 gfx::Point point(l.x(), std::max(y(), l.y()));
129 return MenuButton::HitTest(point); 129 return MenuButton::HitTest(point);
130 } 130 }
131 131
132 void StatusAreaButton::SetMenuActive(bool active) {
133 menu_active_ = active;
134 }
135
132 int StatusAreaButton::icon_height() { 136 int StatusAreaButton::icon_height() {
133 return 24; 137 return 24;
134 } 138 }
135 139
136 int StatusAreaButton::icon_width() { 140 int StatusAreaButton::icon_width() {
137 return 23; 141 return 23;
138 } 142 }
139 143
140 int StatusAreaButton::horizontal_padding() { 144 int StatusAreaButton::horizontal_padding() {
141 return 1; 145 return 1;
(...skipping 12 matching lines...) Expand all
154 SetEnabledColor(kWhiteHaloedTextColor); 158 SetEnabledColor(kWhiteHaloedTextColor);
155 SetTextHaloColor(kWhiteHaloedHaloColor); 159 SetTextHaloColor(kWhiteHaloedHaloColor);
156 break; 160 break;
157 case GRAY_EMBOSSED: 161 case GRAY_EMBOSSED:
158 SetEnabledColor(kGrayEmbossedTextColor); 162 SetEnabledColor(kGrayEmbossedTextColor);
159 SetTextShadowColors(kGrayEmbossedShadowColor, kGrayEmbossedShadowColor); 163 SetTextShadowColors(kGrayEmbossedShadowColor, kGrayEmbossedShadowColor);
160 SetTextShadowOffset(0, 1); 164 SetTextShadowOffset(0, 1);
161 break; 165 break;
162 } 166 }
163 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698