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

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

Issue 187001: GTK: Implement the bookmark bar chevron.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: update in more places Created 11 years, 4 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_bar_gtk.cc » ('j') | chrome/browser/gtk/bookmark_bar_gtk.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk.h
===================================================================
--- chrome/browser/gtk/bookmark_bar_gtk.h (revision 25076)
+++ chrome/browser/gtk/bookmark_bar_gtk.h (working copy)
@@ -84,6 +84,9 @@
// any bookmarks in the bookmark bar node.
void SetInstructionState();
+ // Sets the visibility of the overflow chevron.
+ void SetChevronState();
+
// Helper function which destroys all the bookmark buttons in the GtkToolbar.
void RemoveAllBookmarkButtons();
@@ -92,6 +95,17 @@
// bookmark bar model has.
int GetBookmarkButtonCount();
+ // Set the appearance of the overflow button appropriately (either chromium
+ // style or GTK style).
+ void SetOverflowButtonAppearance();
+
+ // Returns the index of the first bookmark that is not visible on the bar.
+ // Returns -1 if they are all visible.
+ // |extra_space| is how much extra space to give the toolbar during the
+ // calculation (for the purposes of determining if ditching the chevron
+ // would be a good idea).
+ int GetFirstHiddenBookmark(int extra_space);
+
// Overridden from BookmarkModelObserver:
// Invoked when the bookmark model has finished loading. Creates a button
@@ -173,6 +187,9 @@
GdkDragContext* context,
guint time,
BookmarkBarGtk* bar);
+ static void OnToolbarSizeAllocate(GtkWidget* widget,
+ GtkAllocation* allocation,
+ BookmarkBarGtk* bar);
// Used for both folder buttons and the toolbar.
static void OnDragReceived(GtkWidget* widget,
@@ -215,6 +232,10 @@
// GtkToolbar which contains all the bookmark buttons.
OwnedWidgetGtk bookmark_toolbar_;
+ // The button that shows extra bookmarks that don't fit on the bookmark
+ // bar.
+ GtkWidget* overflow_button_;
+
// The other bookmarks button.
GtkWidget* other_bookmarks_button_;
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_bar_gtk.cc » ('j') | chrome/browser/gtk/bookmark_bar_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698