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

Side by Side Diff: chrome/browser/gtk/bookmark_bar_gtk.cc

Issue 287015: GTK: properly resize bookmark bar when going from attached to detached on NTP... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/bookmark_bar_gtk.h" 5 #include "chrome/browser/gtk/bookmark_bar_gtk.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/gfx/gtk_util.h" 9 #include "app/gfx/gtk_util.h"
10 #include "app/gfx/canvas_paint.h" 10 #include "app/gfx/canvas_paint.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 336 }
337 } 337 }
338 338
339 #ifdef CHROME_PERSONALIZATION 339 #ifdef CHROME_PERSONALIZATION
340 void BookmarkBarGtk::OnStateChanged() { 340 void BookmarkBarGtk::OnStateChanged() {
341 // TODO(zork): TODO 341 // TODO(zork): TODO
342 } 342 }
343 #endif 343 #endif
344 344
345 void BookmarkBarGtk::EnterFullscreen() { 345 void BookmarkBarGtk::EnterFullscreen() {
346 UpdateFloatingState(); 346 if (ShouldBeFloating())
347 if (!floating_) 347 Show(false);
348 else
348 gtk_widget_hide(widget()); 349 gtk_widget_hide(widget());
349 } 350 }
350 351
351 int BookmarkBarGtk::GetHeight() { 352 int BookmarkBarGtk::GetHeight() {
352 return event_box_->allocation.height; 353 return event_box_->allocation.height;
353 } 354 }
354 355
355 bool BookmarkBarGtk::IsAnimating() { 356 bool BookmarkBarGtk::IsAnimating() {
356 return slide_animation_->IsAnimating(); 357 return slide_animation_->IsAnimating();
357 } 358 }
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 break; 1222 break;
1222 } 1223 }
1223 } 1224 }
1224 DCHECK_NE(button_idx, -1); 1225 DCHECK_NE(button_idx, -1);
1225 1226
1226 // Find the GtkWidget* for the actual target button. 1227 // Find the GtkWidget* for the actual target button.
1227 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; 1228 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1;
1228 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); 1229 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size();
1229 PopupForButton(folder_list[button_idx]); 1230 PopupForButton(folder_list[button_idx]);
1230 } 1231 }
OLDNEW
« 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