OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 <algorithm> | 5 #include <algorithm> |
6 #include <cairo.h> | 6 #include <cairo.h> |
7 #include <math.h> | 7 #include <math.h> |
8 #include <gmodule.h> | 8 #include <gmodule.h> |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 static const int TOOLTIP_SHADOW_DEPTH = 2; | 239 static const int TOOLTIP_SHADOW_DEPTH = 2; |
240 | 240 |
241 // Tooltip shadow color. | 241 // Tooltip shadow color. |
242 static const double TOOLTIP_SHADOW_R = 0; | 242 static const double TOOLTIP_SHADOW_R = 0; |
243 static const double TOOLTIP_SHADOW_G = 0; | 243 static const double TOOLTIP_SHADOW_G = 0; |
244 static const double TOOLTIP_SHADOW_B = 0; | 244 static const double TOOLTIP_SHADOW_B = 0; |
245 | 245 |
246 // Alpha for shadow pixels, from outer-most to inner-most. | 246 // Alpha for shadow pixels, from outer-most to inner-most. |
247 static const double TOOLTIP_SHADOW_ALPHAS[] = { 0.1, 0.2 }; | 247 static const double TOOLTIP_SHADOW_ALPHAS[] = { 0.1, 0.2 }; |
248 | 248 |
249 // Outermost shadow corner radius is 10 pixel tooltip border corner radius | 249 // Outermost shadow corner radius is 4-pixel tooltip border corner radius |
250 // plus TOOLTIP_SHADOW_DEPTH. | 250 // plus TOOLTIP_SHADOW_DEPTH. |
251 static const int TOOLTIP_CORNER_RADIUS = 10 + TOOLTIP_SHADOW_DEPTH; | 251 static const int TOOLTIP_CORNER_RADIUS = 4 + TOOLTIP_SHADOW_DEPTH; |
252 | 252 |
253 // Widget name of GtkCombBox popup menu. | 253 // Widget name of GtkCombBox popup menu. |
254 static const char* kGtkComboBoxPopupMenu = "gtk-combobox-popup-menu"; | 254 static const char* kGtkComboBoxPopupMenu = "gtk-combobox-popup-menu"; |
255 | 255 |
256 // Widget name of ChromeOS options tab. | 256 // Widget name of ChromeOS options tab. |
257 static const char* kChromeOsOptionsTabName = "chromeos-options-tab"; | 257 static const char* kChromeOsOptionsTabName = "chromeos-options-tab"; |
258 | 258 |
259 // Check whether given widget's name is the same as name_to_check. | 259 // Check whether given widget's name is the same as name_to_check. |
260 static bool WidgetHasName(GtkWidget* widget, const char* name_to_check) { | 260 static bool WidgetHasName(GtkWidget* widget, const char* name_to_check) { |
261 const char* widget_name = gtk_widget_get_name(widget); | 261 const char* widget_name = gtk_widget_get_name(widget); |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 GtkStateType state_type, | 1530 GtkStateType state_type, |
1531 GdkRectangle* area, | 1531 GdkRectangle* area, |
1532 GtkWidget* widget, | 1532 GtkWidget* widget, |
1533 const gchar* detail, | 1533 const gchar* detail, |
1534 gint y1, | 1534 gint y1, |
1535 gint y2, | 1535 gint y2, |
1536 gint x) { | 1536 gint x) { |
1537 // We currently don't have any vertical separators. If we do need them, be | 1537 // We currently don't have any vertical separators. If we do need them, be |
1538 // sure and special case so that we don't draw the separator for comboboxs: | 1538 // sure and special case so that we don't draw the separator for comboboxs: |
1539 } | 1539 } |
OLD | NEW |