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

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

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 int color_id, 861 int color_id,
862 const char* gradient_name) const { 862 const char* gradient_name) const {
863 // We use two colors: the main color (passed in) and a lightened version of 863 // We use two colors: the main color (passed in) and a lightened version of
864 // that color (which is supposed to match the light gradient at the top of 864 // that color (which is supposed to match the light gradient at the top of
865 // several GTK+ themes, such as Ambiance, Clearlooks or Bluebird). 865 // several GTK+ themes, such as Ambiance, Clearlooks or Bluebird).
866 ColorMap::const_iterator it = colors_.find(color_id); 866 ColorMap::const_iterator it = colors_.find(color_id);
867 DCHECK(it != colors_.end()); 867 DCHECK(it != colors_.end());
868 SkColor base = it->second; 868 SkColor base = it->second;
869 869
870 gfx::Canvas canvas(gfx::Size(kToolbarImageWidth, kToolbarImageHeight), 870 gfx::Canvas canvas(gfx::Size(kToolbarImageWidth, kToolbarImageHeight),
871 1.0f, true); 871 ui::SCALE_FACTOR_100P, true);
872 872
873 int gradient_size; 873 int gradient_size;
874 GdkColor* gradient_top_color = NULL; 874 GdkColor* gradient_top_color = NULL;
875 gtk_widget_style_get(GTK_WIDGET(fake_frame_), 875 gtk_widget_style_get(GTK_WIDGET(fake_frame_),
876 "frame-gradient-size", &gradient_size, 876 "frame-gradient-size", &gradient_size,
877 gradient_name, &gradient_top_color, 877 gradient_name, &gradient_top_color,
878 NULL); 878 NULL);
879 if (gradient_size) { 879 if (gradient_size) {
880 SkColor lighter = gradient_top_color ? 880 SkColor lighter = gradient_top_color ?
881 GdkColorToSkColor(*gradient_top_color) : 881 GdkColorToSkColor(*gradient_top_color) :
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1069
1070 void Gtk2UI::ClearAllThemeData() { 1070 void Gtk2UI::ClearAllThemeData() {
1071 gtk_images_.clear(); 1071 gtk_images_.clear();
1072 } 1072 }
1073 1073
1074 } // namespace libgtk2ui 1074 } // namespace libgtk2ui
1075 1075
1076 views::LinuxUI* BuildGtk2UI() { 1076 views::LinuxUI* BuildGtk2UI() {
1077 return new libgtk2ui::Gtk2UI; 1077 return new libgtk2ui::Gtk2UI;
1078 } 1078 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/gtk/panels/panel_gtk.cc ('k') | trunk/src/chrome/browser/ui/metro_pin_tab_helper_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698