| Index: chrome/browser/gtk/bookmark_utils_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/gtk/bookmark_utils_gtk.cc (revision 20336)
|
| +++ chrome/browser/gtk/bookmark_utils_gtk.cc (working copy)
|
| @@ -30,6 +30,15 @@
|
| // Only used for the background of the drag widget.
|
| const GdkColor kBackgroundColor = GDK_COLOR_RGB(0xe6, 0xed, 0xf4);
|
|
|
| +// Padding between the chrome button highlight border and the contents (favicon,
|
| +// text).
|
| +// TODO(estade): we need to adjust the top and bottom padding, but first we need
|
| +// to give the bookmark bar more space (at the expense of the toolbar).
|
| +const int kButtonPaddingTop = 0;
|
| +const int kButtonPaddingBottom = 0;
|
| +const int kButtonPaddingLeft = 2;
|
| +const int kButtonPaddingRight = 0;
|
| +
|
| void* AsVoid(const BookmarkNode* node) {
|
| return const_cast<BookmarkNode*>(node);
|
| }
|
| @@ -40,6 +49,7 @@
|
|
|
| const char kBookmarkNode[] = "bookmark-node";
|
|
|
| +// Spacing between the buttons on the bar.
|
| const int kBarButtonPadding = 4;
|
|
|
| GdkPixbuf* GetFolderIcon() {
|
| @@ -123,8 +133,14 @@
|
| GtkWidget* box = gtk_hbox_new(FALSE, kBarButtonPadding);
|
| gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 0);
|
| gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0);
|
| - gtk_container_add(GTK_CONTAINER(button), box);
|
|
|
| + GtkWidget* alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
|
| + gtk_alignment_set_padding(GTK_ALIGNMENT(alignment),
|
| + kButtonPaddingTop, kButtonPaddingBottom,
|
| + kButtonPaddingLeft, kButtonPaddingRight);
|
| + gtk_container_add(GTK_CONTAINER(alignment), box);
|
| + gtk_container_add(GTK_CONTAINER(button), alignment);
|
| +
|
| SetButtonTextColors(label, properties);
|
| g_object_set_data(G_OBJECT(button), bookmark_utils::kBookmarkNode,
|
| AsVoid(node));
|
| @@ -132,7 +148,7 @@
|
| gtk_chrome_button_set_use_gtk_rendering(GTK_CHROME_BUTTON(button),
|
| properties->use_gtk_rendering);
|
|
|
| - gtk_widget_show_all(box);
|
| + gtk_widget_show_all(alignment);
|
| }
|
|
|
| std::string BuildTooltipFor(const BookmarkNode* node) {
|
|
|