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

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

Issue 2342163002: Fix gtk3 build (Closed)
Patch Set: wip Created 4 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
« no previous file with comments | « build/config/linux/gtk3/BUILD.gn ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <X11/Xcursor/Xcursor.h> 9 #include <X11/Xcursor/Xcursor.h>
10 #include <set> 10 #include <set>
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // TODO(erg): ThemeService has a whole interface just for reading default 236 // TODO(erg): ThemeService has a whole interface just for reading default
237 // constants. Figure out what to do with that more long term; for now, just 237 // constants. Figure out what to do with that more long term; for now, just
238 // copy the constants themselves here. 238 // copy the constants themselves here.
239 // 239 //
240 // Default tints. 240 // Default tints.
241 const color_utils::HSL kDefaultTintFrameIncognito = { -1, 0.2f, 0.35f }; 241 const color_utils::HSL kDefaultTintFrameIncognito = { -1, 0.2f, 0.35f };
242 const color_utils::HSL kDefaultTintFrameIncognitoInactive = { -1, 0.3f, 0.6f }; 242 const color_utils::HSL kDefaultTintFrameIncognitoInactive = { -1, 0.3f, 0.6f };
243 243
244 #if GTK_MAJOR_VERSION == 3 244 #if GTK_MAJOR_VERSION == 3
245 const color_utils::HSL kDefaultTintFrameInactive = { -1, -1, 0.75f }; 245 const color_utils::HSL kDefaultTintFrameInactive = { -1, -1, 0.75f };
246 #endif 246
247 // The size of the rendered toolbar image.
248 const int kToolbarImageWidth = 64;
249 const int kToolbarImageHeight = 128;
250 #endif // GTK_MAJOR_VERSION == 3
247 251
248 // Picks a button tint from a set of background colors. While 252 // Picks a button tint from a set of background colors. While
249 // |accent_color| will usually be the same color through a theme, this 253 // |accent_color| will usually be the same color through a theme, this
250 // function will get called with the normal GtkLabel |text_color|/GtkWindow 254 // function will get called with the normal GtkLabel |text_color|/GtkWindow
251 // |background_color| pair and the GtkEntry |text_color|/|background_color| 255 // |background_color| pair and the GtkEntry |text_color|/|background_color|
252 // pair. While 3/4 of the time the resulting tint will be the same, themes that 256 // pair. While 3/4 of the time the resulting tint will be the same, themes that
253 // have a dark window background (with light text) and a light text entry (with 257 // have a dark window background (with light text) and a light text entry (with
254 // dark text) will get better icons with this separated out. 258 // dark text) will get better icons with this separated out.
255 void PickButtonTintFromColors(SkColor accent_color, 259 void PickButtonTintFromColors(SkColor accent_color,
256 SkColor text_color, 260 SkColor text_color,
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 // Blacklist scaling factors <130% (crbug.com/484400) and round 1134 // Blacklist scaling factors <130% (crbug.com/484400) and round
1131 // to 1 decimal to prevent rendering problems (crbug.com/485183). 1135 // to 1 decimal to prevent rendering problems (crbug.com/485183).
1132 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10; 1136 return scale < 1.3f ? 1.0f : roundf(scale * 10) / 10;
1133 } 1137 }
1134 1138
1135 } // namespace libgtk2ui 1139 } // namespace libgtk2ui
1136 1140
1137 views::LinuxUI* BuildGtk2UI() { 1141 views::LinuxUI* BuildGtk2UI() {
1138 return new libgtk2ui::Gtk2UI; 1142 return new libgtk2ui::Gtk2UI;
1139 } 1143 }
OLDNEW
« no previous file with comments | « build/config/linux/gtk3/BUILD.gn ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698