diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 22:08:32 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 22:08:32 +0000 |
commit | 094302f1c1fbd9815b03dc23769315e4b2875e40 (patch) | |
tree | a95b1de827074000244c4847c7b7802217125545 | |
parent | d7b36dcdc2f0daea33abd653d78c7c107b541ae3 (diff) | |
download | chromium_src-094302f1c1fbd9815b03dc23769315e4b2875e40.zip chromium_src-094302f1c1fbd9815b03dc23769315e4b2875e40.tar.gz chromium_src-094302f1c1fbd9815b03dc23769315e4b2875e40.tar.bz2 |
GTK: add back toolbar border.
BUG=26239
TEST=launch browser, look at border under toolbar, open findbar
Review URL: http://codereview.chromium.org/339074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30522 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 14 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.h | 3 |
2 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index b3bee8d..457dd61 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1485,6 +1485,8 @@ void BrowserWindowGtk::AddFindBar(FindBarGtk* findbar) { gtk_box_pack_start(GTK_BOX(render_area_vbox_), findbar->widget(), FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(render_area_vbox_), findbar->widget(), 0); + + gtk_widget_hide(toolbar_border_); } void BrowserWindowGtk::ResetCustomFrameCursor() { @@ -1694,6 +1696,13 @@ void BrowserWindowGtk::InitWidgets() { // |render_area_vbox_| is packed in |render_area_event_box_|. render_area_vbox_ = gtk_vbox_new(FALSE, 0); gtk_widget_set_name(render_area_vbox_, "chrome-render-area-vbox"); + + toolbar_border_ = gtk_event_box_new(); + gtk_box_pack_start(GTK_BOX(render_area_vbox_), + toolbar_border_, FALSE, FALSE, 0); + gtk_widget_set_size_request(toolbar_border_, -1, 1); + gtk_widget_show(toolbar_border_); + infobar_container_.reset(new InfoBarContainerGtk(browser_->profile())); gtk_box_pack_start(GTK_BOX(render_area_vbox_), infobar_container_->widget(), @@ -1812,7 +1821,7 @@ void BrowserWindowGtk::InitWidgets() { void BrowserWindowGtk::SetBackgroundColor() { Profile* profile = browser()->profile(); - ThemeProvider* theme_provider = profile->GetThemeProvider(); + GtkThemeProvider* theme_provider = GtkThemeProvider::GetFrom(profile); int frame_color_id; if (IsActive()) { frame_color_id = browser()->profile()->IsOffTheRecord() @@ -1842,6 +1851,9 @@ void BrowserWindowGtk::SetBackgroundColor() { GdkColor frame_prelight_color_gdk = SkColorToGdkColor(frame_prelight_color); gtk_widget_modify_bg(contents_split_, GTK_STATE_PRELIGHT, &frame_prelight_color_gdk); + + GdkColor border_color = theme_provider->GetBorderColor(); + gtk_widget_modify_bg(toolbar_border_, GTK_STATE_NORMAL, &border_color); } void BrowserWindowGtk::OnSizeChanged(int width, int height) { diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h index 05da27a..0743957 100644 --- a/chrome/browser/gtk/browser_window_gtk.h +++ b/chrome/browser/gtk/browser_window_gtk.h @@ -215,6 +215,9 @@ class BrowserWindowGtk : public BrowserWindow, GtkWidget* render_area_vbox_; // EventBox that holds render_area_vbox_. GtkWidget* render_area_event_box_; + // Border between toolbar and render area. This is hidden when the find bar + // is added because thereafter the findbar will draw the border for us. + GtkWidget* toolbar_border_; scoped_ptr<Browser> browser_; |