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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 // regress startup time. Figure out how to do that when we can't access the | 901 // regress startup time. Figure out how to do that when we can't access the |
902 // prefs system from here. | 902 // prefs system from here. |
903 | 903 |
904 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); | 904 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); |
905 | 905 |
906 SkColor toolbar_color = | 906 SkColor toolbar_color = |
907 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); | 907 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); |
908 SkColor label_color = | 908 SkColor label_color = |
909 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); | 909 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); |
910 | 910 |
| 911 colors_[ThemeProperties::COLOR_CONTROL_BACKGROUND] = toolbar_color; |
911 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; | 912 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; |
912 | 913 |
913 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = | 914 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = |
914 color_utils::DeriveDefaultIconColor(label_color); | 915 color_utils::DeriveDefaultIconColor(label_color); |
915 | 916 |
916 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; | 917 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; |
917 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; | 918 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; |
918 | 919 |
919 UpdateDefaultFont(); | 920 UpdateDefaultFont(); |
920 | 921 |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 // Blacklist scaling factors <130% (crbug.com/484400) and round | 1432 // Blacklist scaling factors <130% (crbug.com/484400) and round |
1432 // to 1 decimal to prevent rendering problems (crbug.com/485183). | 1433 // to 1 decimal to prevent rendering problems (crbug.com/485183). |
1433 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; | 1434 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; |
1434 } | 1435 } |
1435 | 1436 |
1436 } // namespace libgtk2ui | 1437 } // namespace libgtk2ui |
1437 | 1438 |
1438 views::LinuxUI* BuildGtk2UI() { | 1439 views::LinuxUI* BuildGtk2UI() { |
1439 return new libgtk2ui::Gtk2UI; | 1440 return new libgtk2ui::Gtk2UI; |
1440 } | 1441 } |
OLD | NEW |