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

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

Issue 2783433002: Gtk3: Use menubar instead of headerbar on version less than 3.10 (Closed)
Patch Set: 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 | « no previous file | chrome/browser/ui/libgtkui/gtk_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/gtk_ui.cc
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc
index e17e70c07bf1e0970464edb8d4429d0db9d5105d..4a33b6d3cb85ec933380d6c2e89b1643ff55a69f 100644
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -864,9 +864,12 @@ void GtkUi::LoadGtkValues() {
colors_[ThemeProperties::COLOR_NTP_HEADER] =
colors_[ThemeProperties::COLOR_FRAME];
#else
- SkColor frame_color = GetBgColor("#headerbar.header-bar.titlebar");
- SkColor frame_color_inactive =
- GetBgColor("#headerbar.header-bar.titlebar:backdrop");
+ std::string header_selector = GtkVersionCheck(3, 10)
+ ? "#headerbar.header-bar.titlebar"
+ : "GtkMenuBar#menubar";
+ header_selector = "GtkMenuBar#menubar";
Elliot Glaysher 2017/03/27 22:31:56 Is this a typo? You're setting header_selector imm
Tom (Use chromium acct) 2017/03/27 22:36:11 oops, I accidentally committed this during testing
+ SkColor frame_color = GetBgColor(header_selector);
+ SkColor frame_color_inactive = GetBgColor(header_selector + ":backdrop");
colors_[ThemeProperties::COLOR_FRAME] = frame_color;
colors_[ThemeProperties::COLOR_FRAME_INACTIVE] = frame_color_inactive;
colors_[ThemeProperties::COLOR_FRAME_INCOGNITO] =
@@ -921,11 +924,10 @@ void GtkUi::LoadGtkValues() {
// These colors represent the border drawn around tabs and between
// the tabstrip and toolbar.
SkColor toolbar_top_separator = GetToolbarTopSeparatorColor(
- GetBorderColor("#headerbar.header-bar.titlebar GtkButton#button"),
- frame_color, toolbar_button_border, toolbar_color);
+ GetBorderColor(header_selector + " GtkButton#button"), frame_color,
+ toolbar_button_border, toolbar_color);
SkColor toolbar_top_separator_inactive = GetToolbarTopSeparatorColor(
- GetBorderColor(
- "#headerbar.header-bar.titlebar:backdrop GtkButton#button"),
+ GetBorderColor(header_selector + ":backdrop GtkButton#button"),
frame_color_inactive, toolbar_button_border, toolbar_color);
// Unlike with toolbars, we always want a border around tabs, so let
// ThemeService choose the border color if the theme doesn't provide one.
« no previous file with comments | « no previous file | chrome/browser/ui/libgtkui/gtk_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698