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

Unified Diff: chrome/browser/gtk/bookmark_bar_gtk.cc

Issue 150203: Clean up some bookmark related hacks. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_utils_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk.cc
===================================================================
--- chrome/browser/gtk/bookmark_bar_gtk.cc (revision 19793)
+++ chrome/browser/gtk/bookmark_bar_gtk.cc (working copy)
@@ -150,16 +150,21 @@
gtk_box_pack_start(GTK_BOX(bookmark_hbox_.get()), gtk_vseparator_new(),
FALSE, FALSE, 0);
+ // We pack the button manually (rather than using gtk_button_set_*) so that
+ // we can have finer control over its label.
other_bookmarks_button_ = gtk_chrome_button_new();
ConnectFolderButtonEvents(other_bookmarks_button_);
- gtk_button_set_label(
- GTK_BUTTON(other_bookmarks_button_),
+
+ GtkWidget* image = gtk_image_new_from_pixbuf(folder_icon);
+ GtkWidget* label = gtk_label_new(
l10n_util::GetStringUTF8(IDS_BOOMARK_BAR_OTHER_BOOKMARKED).c_str());
- gtk_button_set_image(GTK_BUTTON(other_bookmarks_button_),
- gtk_image_new_from_pixbuf(folder_icon));
- // Set the proper text colors.
- bookmark_utils::SetButtonTextColors(other_bookmarks_button_);
+ bookmark_utils::SetButtonTextColors(label);
+ GtkWidget* box = gtk_hbox_new(FALSE, bookmark_utils::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(other_bookmarks_button_), box);
+
gtk_box_pack_start(GTK_BOX(bookmark_hbox_.get()), other_bookmarks_button_,
FALSE, FALSE, 0);
gtk_widget_set_size_request(bookmark_hbox_.get(), -1, 0);
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_utils_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698