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

Unified Diff: chrome/browser/gtk/browser_titlebar.cc

Issue 159745: Fix a bug where we tried to get the position of the tabstrip (Closed)
Patch Set: Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_titlebar.cc
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc
index b9a10d375c0bda759ec4b616e071e50aa1555f01..11d34996ecbf57855c03477d3de5a072865b30a8 100644
--- a/chrome/browser/gtk/browser_titlebar.cc
+++ b/chrome/browser/gtk/browser_titlebar.cc
@@ -111,13 +111,14 @@ void BrowserTitlebar::Init() {
// If we're a popup window or in app mode, we don't display the spy guy or
// the tab strip. Instead, put an hbox in titlebar_alignment_ in place of
// the tab strip.
- // +- Alignment (titlebar_alignment_) ----------------------------+
- // |+ HBox ------------------------------------------------------+|
- // ||+- Image (app_mode_favicon_) -++- Label (app_mode_title_) -+||
- // ||| favicon || page title |||
- // ||+-----------------------------++---------------------------+||
- // |+------------------------------------------------------------+|
- // +--------------------------------------------------------------+
+ // +- Alignment (titlebar_alignment_) -----------------------------------+
+ // |+ HBox -------------------------------------------------------------+|
+ // ||+- TabStripGtk -++- Image ----------------++- Label --------------+||
+ // ||| hidden ++ (app_mode_favicon_) || (app_mode_title_) |||
+ // ||| || favicon || page title |||
+ // ||+---------------++------------------------++----------------------+||
+ // |+-------------------------------------------------------------------+|
+ // +---------------------------------------------------------------------+
GtkWidget* container_hbox = gtk_hbox_new(FALSE, 0);
container_ = gtk_event_box_new();
@@ -160,6 +161,12 @@ void BrowserTitlebar::Init() {
GtkWidget* app_mode_hbox = gtk_hbox_new(FALSE, kIconTitleSpacing);
gtk_container_add(GTK_CONTAINER(titlebar_alignment_), app_mode_hbox);
+ // Put the tab strip in the hbox even though we don't show it. Sometimes
+ // we need the position of the tab strip so make sure it's in our widget
+ // hierarchy.
+ gtk_box_pack_start(GTK_BOX(app_mode_hbox),
+ browser_window_->tabstrip()->widget(), FALSE, FALSE, 0);
+
// We use the app logo as a placeholder image so the title doesn't jump
// around.
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
« no previous file with comments | « no previous file | chrome/browser/gtk/tabs/tab_strip_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698