summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/find_bar_gtk.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 21:58:13 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-11 21:58:13 +0000
commitf321a984b66500ea0063549612992cf784da12b6 (patch)
tree4bf959d1aeb5a871f0dcedf7e801d54e530c46e8 /chrome/browser/gtk/find_bar_gtk.cc
parent0fb2bd939380e4d46bad10eb597bff4980ca7db2 (diff)
downloadchromium_src-f321a984b66500ea0063549612992cf784da12b6.zip
chromium_src-f321a984b66500ea0063549612992cf784da12b6.tar.gz
chromium_src-f321a984b66500ea0063549612992cf784da12b6.tar.bz2
GTK Themes: Use a consistent border color along all webcontent.
The color used in the status bubble is now used in the top margin and in the download bar. This doesn't convert the popup notification, as that needs additional changes... Review URL: http://codereview.chromium.org/164345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/find_bar_gtk.cc')
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index 8bfbc85..cfc37fe 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/gtk/tabs/tab_strip_gtk.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/gtk_util.h"
+#include "chrome/common/notification_service.h"
#include "grit/generated_resources.h"
#include "webkit/api/public/gtk/WebInputEventFactory.h"
@@ -150,7 +151,6 @@ void FindBarGtk::InitWidgets() {
fixed_.Own(gtk_fixed_new());
border_ = gtk_event_box_new();
gtk_widget_set_size_request(border_, 1, 1);
- gtk_widget_modify_bg(border_, GTK_STATE_NORMAL, &kFrameBorderColor);
gtk_fixed_put(GTK_FIXED(widget()), border_, 0, 0);
gtk_fixed_put(GTK_FIXED(widget()), slide_widget(), 0, 0);
@@ -235,6 +235,10 @@ void FindBarGtk::InitWidgets() {
1, 1, 1, 0);
gtk_util::CenterWidgetInHBox(hbox, border_bin_aa, true, 0);
+ theme_provider_->InitThemesFor(this);
+ registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
+ NotificationService::AllSources());
+
// We take care to avoid showing the slide animator widget.
gtk_widget_show_all(container_);
gtk_widget_show(widget());
@@ -390,6 +394,19 @@ FindBarTesting* FindBarGtk::GetFindBarTesting() {
return this;
}
+void FindBarGtk::Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) {
+ DCHECK_EQ(type.value, NotificationType::BROWSER_THEME_CHANGED);
+
+ if (theme_provider_->UseGtkTheme()) {
+ GdkColor color = theme_provider_->GetBorderColor();
+ gtk_widget_modify_bg(border_, GTK_STATE_NORMAL, &color);
+ } else {
+ gtk_widget_modify_bg(border_, GTK_STATE_NORMAL, &kFrameBorderColor);
+ }
+}
+
bool FindBarGtk::GetFindBarWindowInfo(gfx::Point* position,
bool* fully_visible) {
NOTIMPLEMENTED();