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

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

Issue 39168: Fix a toolbar width TODO. (Closed)
Patch Set: Created 11 years, 9 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
« 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/browser_toolbar_view_gtk.h" 5 #include "chrome/browser/gtk/browser_toolbar_view_gtk.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/base_paths_linux.h" 8 #include "base/base_paths_linux.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 BrowserToolbarGtk::~BrowserToolbarGtk() { 49 BrowserToolbarGtk::~BrowserToolbarGtk() {
50 } 50 }
51 51
52 void BrowserToolbarGtk::Init(Profile* profile) { 52 void BrowserToolbarGtk::Init(Profile* profile) {
53 show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this); 53 show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this);
54 54
55 toolbar_ = gtk_hbox_new(FALSE, 0); 55 toolbar_ = gtk_hbox_new(FALSE, 0);
56 gtk_container_set_border_width(GTK_CONTAINER(toolbar_), 4); 56 gtk_container_set_border_width(GTK_CONTAINER(toolbar_), 4);
57 // TODO(evanm): this setting of the x-size to 0 makes it so the window 57 gtk_widget_set_size_request(toolbar_, -1, kToolbarHeight);
tony 2009/03/05 01:11:13 Nit: Maybe add a comment explaining -1?
58 // can be resized arbitrarily small. We should figure out what we want
59 // with respect to resizing before engineering around it, though.
60 gtk_widget_set_size_request(toolbar_, 0, kToolbarHeight);
61 58
62 toolbar_tooltips_ = gtk_tooltips_new(); 59 toolbar_tooltips_ = gtk_tooltips_new();
63 60
64 back_.reset(BuildBackForwardButton(IDR_BACK, IDR_BACK_P, IDR_BACK_H, 61 back_.reset(BuildBackForwardButton(IDR_BACK, IDR_BACK_P, IDR_BACK_H,
65 IDR_BACK_D, 62 IDR_BACK_D,
66 l10n_util::GetString(IDS_TOOLTIP_BACK))); 63 l10n_util::GetString(IDS_TOOLTIP_BACK)));
67 forward_.reset(BuildBackForwardButton(IDR_FORWARD, IDR_FORWARD_P, 64 forward_.reset(BuildBackForwardButton(IDR_FORWARD, IDR_FORWARD_P,
68 IDR_FORWARD_H, IDR_FORWARD_D, 65 IDR_FORWARD_H, IDR_FORWARD_D,
69 l10n_util::GetString(IDS_TOOLTIP_FORWARD))); 66 l10n_util::GetString(IDS_TOOLTIP_FORWARD)));
70 67
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu())); 386 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu()));
390 } 387 }
391 388
392 app_menu_->Popup(app_menu_button_->widget(), button_press_event); 389 app_menu_->Popup(app_menu_button_->widget(), button_press_event);
393 } 390 }
394 391
395 CustomDrawButton* BrowserToolbarGtk::MakeHomeButton() { 392 CustomDrawButton* BrowserToolbarGtk::MakeHomeButton() {
396 return BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, 393 return BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0,
397 l10n_util::GetString(IDS_TOOLTIP_HOME)); 394 l10n_util::GetString(IDS_TOOLTIP_HOME));
398 } 395 }
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