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

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

Issue 155821: GTK Themes: In GTK mode, bookmark buttons should be the same size as "Other bookmarks". (Closed)
Patch Set: Created 11 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk.cc
diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc
index 44b6be63549c899d642bcaa78a38c6f94c931830..4c941481a371d1ed797378bc8df6251d6d955103 100644
--- a/chrome/browser/gtk/bookmark_bar_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bar_gtk.cc
@@ -47,6 +47,25 @@ const int kInstructionsPadding = 6;
// Color of the instructional text.
const GdkColor kInstructionsColor = GDK_COLOR_RGB(128, 128, 142);
+void SetToolBarStyle() {
+ static bool style_was_set = false;
+
+ if (style_was_set)
+ return;
+ style_was_set = true;
+
+ gtk_rc_parse_string(
+ "style \"chrome-bookmark-toolbar\" {"
+ " xthickness = 0\n"
+ " ythickness = 0\n"
+ " GtkWidget::focus-padding = 0\n"
+ " GtkContainer::border-width = 0\n"
+ " GtkToolBar::internal-padding = 0\n"
+ " GtkToolBar::shadow-type = GTK_SHADOW_NONE\n"
+ "}\n"
+ "widget \"*chrome-bookmark-toolbar\" style \"chrome-bookmark-toolbar\"");
+}
+
} // namespace
BookmarkBarGtk::BookmarkBarGtk(Profile* profile, Browser* browser,
@@ -129,6 +148,8 @@ void BookmarkBarGtk::Init(Profile* profile) {
G_CALLBACK(&OnHBoxExpose), this);
bookmark_toolbar_.Own(gtk_toolbar_new());
+ SetToolBarStyle();
+ gtk_widget_set_name(bookmark_toolbar_.get(), "chrome-bookmark-toolbar");
gtk_widget_set_app_paintable(bookmark_toolbar_.get(), TRUE);
g_signal_connect(G_OBJECT(bookmark_toolbar_.get()), "expose-event",
G_CALLBACK(&OnToolbarExpose), this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698