summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/find_bar_gtk.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 17:43:32 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-03 17:43:32 +0000
commitbb7d413a1d400d5b1dc7fcbb2a7904bf2eb13e5a (patch)
tree037d649297171cb2d32392931dbfaf5df27831e4 /chrome/browser/gtk/find_bar_gtk.cc
parentc42799fb803edf7c35d27cdb2ed886ec18455e31 (diff)
downloadchromium_src-bb7d413a1d400d5b1dc7fcbb2a7904bf2eb13e5a.zip
chromium_src-bb7d413a1d400d5b1dc7fcbb2a7904bf2eb13e5a.tar.gz
chromium_src-bb7d413a1d400d5b1dc7fcbb2a7904bf2eb13e5a.tar.bz2
Put a border around the find bar text entry field.
Review URL: http://codereview.chromium.org/56207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/find_bar_gtk.cc')
-rw-r--r--chrome/browser/gtk/find_bar_gtk.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc
index d6fb447..2fdc9f85 100644
--- a/chrome/browser/gtk/find_bar_gtk.cc
+++ b/chrome/browser/gtk/find_bar_gtk.cc
@@ -18,6 +18,7 @@
namespace {
const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xe6, 0xed, 0xf4);
+const GdkColor kBorderColor = GDK_COLOR_RGB(0xbe, 0xc8, 0xd4);
// Padding around the container.
const int kBarPadding = 4;
@@ -91,11 +92,11 @@ void FindBarGtk::InitWidgets() {
// font size.
gtk_widget_set_size_request(find_text_, -1, 20);
gtk_entry_set_has_frame(GTK_ENTRY(find_text_), FALSE);
- // TODO(tc): We need a border around the find box. This should probably be
- // drawn by the background. I tried drawing one using
- // gfx::CreateGtkBorderBin, but I couldn't get it to draw a 1px border on
- // top and bottom.
- gtk_box_pack_end(GTK_BOX(hbox), find_text_, FALSE, FALSE, 0);
+ GtkWidget* border_bin = gfx::CreateGtkBorderBin(find_text_, &kBorderColor,
+ 1, 1, 1, 0);
+ centering_vbox = gtk_vbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(centering_vbox), border_bin, TRUE, FALSE, 0);
+ gtk_box_pack_end(GTK_BOX(hbox), centering_vbox, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(find_text_), "changed",