| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/libgtk2ui/gtk2_ui.h" | 5 #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <pango/pango.h> | 8 #include <pango/pango.h> |
| 9 #include <X11/Xcursor/Xcursor.h> | 9 #include <X11/Xcursor/Xcursor.h> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 // regress startup time. Figure out how to do that when we can't access the | 906 // regress startup time. Figure out how to do that when we can't access the |
| 907 // prefs system from here. | 907 // prefs system from here. |
| 908 | 908 |
| 909 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); | 909 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); |
| 910 | 910 |
| 911 SkColor toolbar_color = | 911 SkColor toolbar_color = |
| 912 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); | 912 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); |
| 913 SkColor label_color = | 913 SkColor label_color = |
| 914 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); | 914 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); |
| 915 | 915 |
| 916 colors_[ThemeProperties::COLOR_CONTROL_BACKGROUND] = toolbar_color; | |
| 917 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; | 916 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; |
| 918 | 917 |
| 919 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = | 918 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = |
| 920 color_utils::DeriveDefaultIconColor(label_color); | 919 color_utils::DeriveDefaultIconColor(label_color); |
| 921 | 920 |
| 922 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; | 921 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; |
| 923 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; | 922 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; |
| 924 | 923 |
| 925 UpdateDefaultFont(); | 924 UpdateDefaultFont(); |
| 926 | 925 |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 // Blacklist scaling factors <130% (crbug.com/484400) and round | 1436 // Blacklist scaling factors <130% (crbug.com/484400) and round |
| 1438 // to 1 decimal to prevent rendering problems (crbug.com/485183). | 1437 // to 1 decimal to prevent rendering problems (crbug.com/485183). |
| 1439 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; | 1438 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; |
| 1440 } | 1439 } |
| 1441 | 1440 |
| 1442 } // namespace libgtk2ui | 1441 } // namespace libgtk2ui |
| 1443 | 1442 |
| 1444 views::LinuxUI* BuildGtk2UI() { | 1443 views::LinuxUI* BuildGtk2UI() { |
| 1445 return new libgtk2ui::Gtk2UI; | 1444 return new libgtk2ui::Gtk2UI; |
| 1446 } | 1445 } |
| OLD | NEW |