OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/gtk/rounded_window.h" | 5 #include "chrome/browser/gtk/rounded_window.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 #include <math.h> | 8 #include <math.h> |
9 | 9 |
10 #include "app/gtk_signal_registrar.h" | 10 #include "app/gtk_signal_registrar.h" |
11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/logging.h" |
12 #include "chrome/browser/gtk/gtk_util.h" | 13 #include "chrome/browser/gtk/gtk_util.h" |
13 | 14 |
14 namespace gtk_util { | 15 namespace gtk_util { |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 const char* kRoundedData = "rounded-window-data"; | 19 const char* kRoundedData = "rounded-window-data"; |
19 | 20 |
20 // If the border radius is less than |kMinRoundedBorderSize|, we don't actually | 21 // If the border radius is less than |kMinRoundedBorderSize|, we don't actually |
21 // round the corners, we just truncate the corner. | 22 // round the corners, we just truncate the corner. |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 312 |
312 void SetRoundedWindowBorderColor(GtkWidget* widget, GdkColor color) { | 313 void SetRoundedWindowBorderColor(GtkWidget* widget, GdkColor color) { |
313 DCHECK(widget); | 314 DCHECK(widget); |
314 RoundedWindowData* data = static_cast<RoundedWindowData*>( | 315 RoundedWindowData* data = static_cast<RoundedWindowData*>( |
315 g_object_get_data(G_OBJECT(widget), kRoundedData)); | 316 g_object_get_data(G_OBJECT(widget), kRoundedData)); |
316 DCHECK(data); | 317 DCHECK(data); |
317 data->border_color = color; | 318 data->border_color = color; |
318 } | 319 } |
319 | 320 |
320 } // namespace gtk_util | 321 } // namespace gtk_util |
OLD | NEW |