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

Unified Diff: chrome/browser/ui/libgtkui/native_theme_gtk3.cc

Issue 2783433002: Gtk3: Use menubar instead of headerbar on version less than 3.10 (Closed)
Patch Set: Remove bogus line Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/native_theme_gtk3.cc
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk3.cc b/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
index 7bdaaddc69ac70a208d97600b4c476c0038ce9f1..788619182ee18c65cdadf3044b5703de882f7906 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk3.cc
@@ -148,8 +148,7 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
GdkColor* color;
gtk_style_context_get_style(link_context, "link-color", &color, nullptr);
if (color) {
- SkColor ret_color = SkColorSetRGB(color->red / 255, color->green / 255,
- color->blue / 255);
+ SkColor ret_color = GdkColorToSkColor(*color);
// gdk_color_free() was deprecated in Gtk3.14. This code path is only
// taken on versions earlier than Gtk3.12, but the compiler doesn't know
// that, so silence the deprecation warnings.
@@ -574,7 +573,8 @@ void NativeThemeGtk3::PaintFrameTopArea(
State state,
const gfx::Rect& rect,
const FrameTopAreaExtraParams& frame_top_area) const {
- auto context = GetStyleContextFromCss(frame_top_area.use_custom_frame
+ auto context = GetStyleContextFromCss(frame_top_area.use_custom_frame &&
+ GtkVersionCheck(3, 10)
? "#headerbar.header-bar.titlebar"
: "GtkMenuBar#menubar");
ApplyCssToContext(context, "* { border-radius: 0px; border-style: none; }");
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698