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 <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 // regress startup time. Figure out how to do that when we can't access the | 895 // regress startup time. Figure out how to do that when we can't access the |
896 // prefs system from here. | 896 // prefs system from here. |
897 | 897 |
898 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); | 898 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); |
899 | 899 |
900 SkColor toolbar_color = | 900 SkColor toolbar_color = |
901 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); | 901 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); |
902 SkColor label_color = | 902 SkColor label_color = |
903 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); | 903 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); |
904 | 904 |
905 colors_[ThemeProperties::COLOR_CONTROL_BACKGROUND] = toolbar_color; | |
906 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; | 905 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; |
907 | 906 |
908 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = | 907 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = |
909 color_utils::DeriveDefaultIconColor(label_color); | 908 color_utils::DeriveDefaultIconColor(label_color); |
910 | 909 |
911 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; | 910 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; |
912 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; | 911 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; |
913 | 912 |
914 UpdateDefaultFont(); | 913 UpdateDefaultFont(); |
915 | 914 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1403 // Blacklist scaling factors <130% (crbug.com/484400) and round | 1402 // Blacklist scaling factors <130% (crbug.com/484400) and round |
1404 // to 1 decimal to prevent rendering problems (crbug.com/485183). | 1403 // to 1 decimal to prevent rendering problems (crbug.com/485183). |
1405 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; | 1404 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; |
1406 } | 1405 } |
1407 | 1406 |
1408 } // namespace libgtk2ui | 1407 } // namespace libgtk2ui |
1409 | 1408 |
1410 views::LinuxUI* BuildGtk2UI() { | 1409 views::LinuxUI* BuildGtk2UI() { |
1411 return new libgtk2ui::Gtk2UI; | 1410 return new libgtk2ui::Gtk2UI; |
1412 } | 1411 } |
OLD | NEW |