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

Side by Side Diff: chrome/browser/gtk/browser_toolbar_gtk.h

Issue 155310: GTK Themes: Prevent colors from "leaking through" by using an event box. (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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/browser_toolbar_gtk.cc » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_
6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ 6 #define CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void Init(Profile* profile, GtkWindow* top_level_window); 42 void Init(Profile* profile, GtkWindow* top_level_window);
43 43
44 // Adds this GTK toolbar into a sizing box. 44 // Adds this GTK toolbar into a sizing box.
45 void AddToolbarToBox(GtkWidget* box); 45 void AddToolbarToBox(GtkWidget* box);
46 46
47 void Show(); 47 void Show();
48 void Hide(); 48 void Hide();
49 49
50 // Getter for the containing widget. 50 // Getter for the containing widget.
51 GtkWidget* widget() { 51 GtkWidget* widget() {
52 return toolbar_; 52 return event_box_;
53 } 53 }
54 54
55 virtual LocationBar* GetLocationBar() const; 55 virtual LocationBar* GetLocationBar() const;
56 56
57 GoButtonGtk* GetGoButton() { return go_.get(); } 57 GoButtonGtk* GetGoButton() { return go_.get(); }
58 58
59 // Overridden from CommandUpdater::CommandObserver: 59 // Overridden from CommandUpdater::CommandObserver:
60 virtual void EnabledStateChangedForCommand(int id, bool enabled); 60 virtual void EnabledStateChangedForCommand(int id, bool enabled);
61 61
62 // Overridden from MenuGtk::Delegate: 62 // Overridden from MenuGtk::Delegate:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 static void OnPageAppMenuMoveCurrent(GtkWidget* widget, 145 static void OnPageAppMenuMoveCurrent(GtkWidget* widget,
146 GtkMenuDirectionType dir, 146 GtkMenuDirectionType dir,
147 BrowserToolbarGtk* toolbar); 147 BrowserToolbarGtk* toolbar);
148 148
149 // Initialize the background NineBox. 149 // Initialize the background NineBox.
150 void InitNineBox(); 150 void InitNineBox();
151 151
152 // Ninebox for the toolbar background 152 // Ninebox for the toolbar background
153 scoped_ptr<NineBox> background_ninebox_; 153 scoped_ptr<NineBox> background_ninebox_;
154 154
155 // An event box that holds |toolbar_|. We need the toolbar to have its own
156 // GdkWindow when we use the GTK drawing because otherwise the color from our
157 // parent GdkWindow will leak through with some theme engines (such as
158 // Clearlooks).
159 GtkWidget* event_box_;
160
155 // Gtk widgets. The toolbar is an hbox with each of the other pieces of the 161 // Gtk widgets. The toolbar is an hbox with each of the other pieces of the
156 // toolbar placed side by side. 162 // toolbar placed side by side.
157 GtkWidget* toolbar_; 163 GtkWidget* toolbar_;
158 164
159 // The location bar view. 165 // The location bar view.
160 scoped_ptr<LocationBarViewGtk> location_bar_; 166 scoped_ptr<LocationBarViewGtk> location_bar_;
161 167
162 // A pointer to our window's accelerator list. 168 // A pointer to our window's accelerator list.
163 GtkAccelGroup* accel_group_; 169 GtkAccelGroup* accel_group_;
164 170
(...skipping 18 matching lines...) Expand all
183 // Controls whether or not a home button should be shown on the toolbar. 189 // Controls whether or not a home button should be shown on the toolbar.
184 BooleanPrefMember show_home_button_; 190 BooleanPrefMember show_home_button_;
185 191
186 // The event state the last time we observed a button release event. 192 // The event state the last time we observed a button release event.
187 int last_release_event_flags_; 193 int last_release_event_flags_;
188 194
189 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk); 195 DISALLOW_COPY_AND_ASSIGN(BrowserToolbarGtk);
190 }; 196 };
191 197
192 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_ 198 #endif // CHROME_BROWSER_GTK_BROWSER_TOOLBAR_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/browser_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698