Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: chrome/browser/ui/libgtk2ui/gtk2_ui.cc

Issue 2062353002: Replace CONTROL_BACKGROUND and DETACHED_BOOKMARK_BAR_BACKGROUND by COLOR_NTP_BACKGROUND (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and force opaque for color_ntp_background from the theme machinery Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 // regress startup time. Figure out how to do that when we can't access the 898 // regress startup time. Figure out how to do that when we can't access the
899 // prefs system from here. 899 // prefs system from here.
900 900
901 NativeThemeGtk2* theme = NativeThemeGtk2::instance(); 901 NativeThemeGtk2* theme = NativeThemeGtk2::instance();
902 902
903 SkColor toolbar_color = 903 SkColor toolbar_color =
904 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor); 904 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelBackgroundColor);
905 SkColor label_color = 905 SkColor label_color =
906 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor); 906 theme->GetSystemColor(ui::NativeTheme::kColorId_LabelEnabledColor);
907 907
908 colors_[ThemeProperties::COLOR_CONTROL_BACKGROUND] = toolbar_color;
909 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color; 908 colors_[ThemeProperties::COLOR_TOOLBAR] = toolbar_color;
910 909
911 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] = 910 colors_[ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON] =
912 color_utils::DeriveDefaultIconColor(label_color); 911 color_utils::DeriveDefaultIconColor(label_color);
913 912
914 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color; 913 colors_[ThemeProperties::COLOR_TAB_TEXT] = label_color;
915 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color; 914 colors_[ThemeProperties::COLOR_BOOKMARK_TEXT] = label_color;
916 915
917 UpdateDefaultFont(); 916 UpdateDefaultFont();
918 917
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 // Blacklist scaling factors <130% (crbug.com/484400) and round 1410 // Blacklist scaling factors <130% (crbug.com/484400) and round
1412 // to 1 decimal to prevent rendering problems (crbug.com/485183). 1411 // to 1 decimal to prevent rendering problems (crbug.com/485183).
1413 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; 1412 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10;
1414 } 1413 }
1415 1414
1416 } // namespace libgtk2ui 1415 } // namespace libgtk2ui
1417 1416
1418 views::LinuxUI* BuildGtk2UI() { 1417 views::LinuxUI* BuildGtk2UI() {
1419 return new libgtk2ui::Gtk2UI; 1418 return new libgtk2ui::Gtk2UI;
1420 } 1419 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698