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 "chrome/browser/ui/gtk/gtk_chrome_button.h" | 5 #include "chrome/browser/ui/gtk/gtk_chrome_button.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "chrome/browser/ui/gtk/nine_box.h" | 8 #include "chrome/browser/ui/gtk/nine_box.h" |
9 #include "gfx/gtk_util.h" | |
10 #include "grit/app_resources.h" | 9 #include "grit/app_resources.h" |
| 10 #include "ui/gfx/gtk_util.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // The theme graphics for when the mouse is over the button. | 14 // The theme graphics for when the mouse is over the button. |
15 NineBox* g_nine_box_prelight; | 15 NineBox* g_nine_box_prelight; |
16 // The theme graphics for when the button is clicked. | 16 // The theme graphics for when the button is clicked. |
17 NineBox* g_nine_box_active; | 17 NineBox* g_nine_box_active; |
18 | 18 |
19 } // namespace | 19 } // namespace |
20 | 20 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 gdouble state) { | 164 gdouble state) { |
165 GtkChromeButtonPrivate* priv = GTK_CHROME_BUTTON_GET_PRIVATE(button); | 165 GtkChromeButtonPrivate* priv = GTK_CHROME_BUTTON_GET_PRIVATE(button); |
166 if (state >= 0.0 && state <= 1.0) | 166 if (state >= 0.0 && state <= 1.0) |
167 priv->hover_state = state; | 167 priv->hover_state = state; |
168 else | 168 else |
169 priv->hover_state = -1.0; | 169 priv->hover_state = -1.0; |
170 gtk_widget_queue_draw(GTK_WIDGET(button)); | 170 gtk_widget_queue_draw(GTK_WIDGET(button)); |
171 } | 171 } |
172 | 172 |
173 G_END_DECLS | 173 G_END_DECLS |
OLD | NEW |