summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 20:56:19 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-08 20:56:19 +0000
commitd09b0922f3831944386850682b584e4dccf60357 (patch)
tree3b1d187b5c59a8d6237b7cd5a22bfce341b413f8
parent0281b06f8bbde4c064a9276e6d70484ba2a3eaec (diff)
downloadchromium_src-d09b0922f3831944386850682b584e4dccf60357.zip
chromium_src-d09b0922f3831944386850682b584e4dccf60357.tar.gz
chromium_src-d09b0922f3831944386850682b584e4dccf60357.tar.bz2
Move GTK spacing constants into chrome/common/gtk_util.h
BUG=11507 Review URL: http://codereview.chromium.org/118399 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17894 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/about_chrome_dialog.cc6
-rw-r--r--chrome/browser/gtk/bookmark_editor_gtk.cc7
-rw-r--r--chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc7
-rw-r--r--chrome/browser/gtk/hung_renderer_dialog_gtk.cc5
-rw-r--r--chrome/browser/gtk/import_dialog_gtk.cc7
-rw-r--r--chrome/browser/gtk/import_lock_dialog_gtk.cc3
-rw-r--r--chrome/browser/gtk/import_progress_dialog_gtk.cc3
-rw-r--r--chrome/browser/gtk/options/general_page_gtk.cc22
-rw-r--r--chrome/browser/gtk/options/options_layout_gtk.cc22
-rw-r--r--chrome/browser/gtk/options/options_window_gtk.cc9
-rw-r--r--chrome/browser/gtk/options/url_picker_dialog_gtk.cc12
-rw-r--r--chrome/common/gtk_util.h18
12 files changed, 65 insertions, 56 deletions
diff --git a/chrome/browser/gtk/about_chrome_dialog.cc b/chrome/browser/gtk/about_chrome_dialog.cc
index f1e005f..c363f16 100644
--- a/chrome/browser/gtk/about_chrome_dialog.cc
+++ b/chrome/browser/gtk/about_chrome_dialog.cc
@@ -13,6 +13,7 @@
#include "base/gfx/gtk_util.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/browser/profile.h"
+#include "chrome/common/gtk_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -142,8 +143,9 @@ void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) {
// We use a separate box for the licensing etc. text. See the comment near
// the top of this function about using a special layout for this dialog.
- GtkWidget* vbox = gtk_vbox_new(FALSE, 6);
- gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
+ gtk_container_set_border_width(GTK_CONTAINER(vbox),
+ gtk_util::kContentAreaBorder);
GtkWidget* copyright_label = MakeMarkupLabel(
"<span size=\"smaller\">%s</span>",
diff --git a/chrome/browser/gtk/bookmark_editor_gtk.cc b/chrome/browser/gtk/bookmark_editor_gtk.cc
index 9cb2bb3..d667d86 100644
--- a/chrome/browser/gtk/bookmark_editor_gtk.cc
+++ b/chrome/browser/gtk/bookmark_editor_gtk.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/history/history.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/common/gtk_util.h"
#include "googleurl/src/gurl.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -122,13 +123,13 @@ void BookmarkEditorGtk::Init(GtkWindow* parent_window) {
// |+-------------------------------------------------------------+|
// +---------------------------------------------------------------+
GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
- gtk_box_set_spacing(GTK_BOX(content_area), 18);
+ gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
GtkWidget* vbox = gtk_vbox_new(FALSE, 12);
GtkWidget* table = gtk_table_new(2, 2, FALSE);
- gtk_table_set_col_spacing(GTK_TABLE(table), 0, 12);
- gtk_table_set_row_spacings(GTK_TABLE(table), 6);
+ gtk_table_set_col_spacing(GTK_TABLE(table), 0, gtk_util::kLabelSpacing);
+ gtk_table_set_row_spacings(GTK_TABLE(table), gtk_util::kControlSpacing);
GtkWidget* label = gtk_label_new(
l10n_util::GetStringUTF8(IDS_BOOMARK_EDITOR_NAME_LABEL).c_str());
diff --git a/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc b/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc
index 35f8432..e410818 100644
--- a/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc
+++ b/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "chrome/browser/profile.h"
+#include "chrome/common/gtk_util.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "grit/generated_resources.h"
@@ -31,9 +32,9 @@ ClearBrowsingDataDialogGtk::ClearBrowsingDataDialogGtk(GtkWindow* parent,
NULL);
GtkWidget* content_area = GTK_DIALOG(dialog)->vbox;
- gtk_box_set_spacing(GTK_BOX(content_area), 18);
+ gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
- GtkWidget* vbox = gtk_vbox_new(FALSE, 6);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
gtk_container_add(GTK_CONTAINER(content_area), vbox);
// Label on top of the checkboxes.
@@ -97,7 +98,7 @@ ClearBrowsingDataDialogGtk::ClearBrowsingDataDialogGtk(GtkWindow* parent,
G_CALLBACK(HandleOnClickedWidget), this);
// Create a horizontal layout for the combo box and label.
- GtkWidget* combo_hbox = gtk_hbox_new(FALSE, 6);
+ GtkWidget* combo_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
GtkWidget* time_period_label_ = gtk_label_new(
l10n_util::GetStringUTF8(IDS_CLEAR_BROWSING_DATA_TIME_LABEL).c_str());
gtk_box_pack_start(GTK_BOX(combo_hbox), time_period_label_, FALSE, FALSE, 0);
diff --git a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
index 254336d..02a7c8b 100644
--- a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
+++ b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc
@@ -11,6 +11,7 @@
#include "base/gfx/gtk_util.h"
#include "base/process_util.h"
#include "chrome/browser/browser_list.h"
+#include "chrome/common/gtk_util.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/result_codes.h"
#include "grit/chromium_strings.h"
@@ -93,7 +94,7 @@ void HungRendererDialogGtk::Init() {
// | kill button wait button|
// ·-----------------------------------·
GtkWidget* contents_vbox = dialog_->vbox;
- gtk_box_set_spacing(GTK_BOX(contents_vbox), 18);
+ gtk_box_set_spacing(GTK_BOX(contents_vbox), gtk_util::kContentAreaSpacing);
GtkWidget* hbox = gtk_hbox_new(FALSE, 12);
gtk_box_pack_start(GTK_BOX(contents_vbox), hbox, TRUE, TRUE, 0);
@@ -106,7 +107,7 @@ void HungRendererDialogGtk::Init() {
GtkWidget* icon = gtk_image_new_from_pixbuf(icon_pixbuf);
gtk_box_pack_start(GTK_BOX(icon_vbox), icon, FALSE, FALSE, 0);
- GtkWidget* vbox = gtk_vbox_new(FALSE, 6);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
GtkWidget* text = gtk_label_new(
diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc
index 172eab4..b6cf511 100644
--- a/chrome/browser/gtk/import_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_dialog_gtk.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "chrome/common/gtk_util.h"
#include "grit/generated_resources.h"
// static
@@ -42,9 +43,9 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) :
gtk_widget_set_size_request(dialog_, 300, -1);
GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
- gtk_box_set_spacing(GTK_BOX(content_area), 18);
+ gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
- GtkWidget* combo_hbox = gtk_hbox_new(FALSE, 12);
+ GtkWidget* combo_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
GtkWidget* from = gtk_label_new(
l10n_util::GetStringUTF8(IDS_IMPORT_FROM_LABEL).c_str());
gtk_box_pack_start(GTK_BOX(combo_hbox), from, FALSE, FALSE, 0);
@@ -61,7 +62,7 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) :
gtk_box_pack_start(GTK_BOX(content_area), combo_hbox, FALSE, FALSE, 0);
- GtkWidget* vbox = gtk_vbox_new(FALSE, 6);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
GtkWidget* description = gtk_label_new(
l10n_util::GetStringUTF8(IDS_IMPORT_ITEMS_LABEL).c_str());
diff --git a/chrome/browser/gtk/import_lock_dialog_gtk.cc b/chrome/browser/gtk/import_lock_dialog_gtk.cc
index 07b59d6..e2a9e17 100644
--- a/chrome/browser/gtk/import_lock_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_lock_dialog_gtk.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "chrome/common/gtk_util.h"
#include "grit/generated_resources.h"
#include "grit/chromium_strings.h"
@@ -28,7 +29,7 @@ ImportLockDialogGtk::ImportLockDialogGtk(GtkWindow* parent,
NULL);
GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
- gtk_box_set_spacing(GTK_BOX(content_area), 18);
+ gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
GtkWidget* label = gtk_label_new(
l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_TEXT).c_str());
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
diff --git a/chrome/browser/gtk/import_progress_dialog_gtk.cc b/chrome/browser/gtk/import_progress_dialog_gtk.cc
index 1dc828e..9a57bf1 100644
--- a/chrome/browser/gtk/import_progress_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_progress_dialog_gtk.cc
@@ -6,6 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "chrome/common/gtk_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
@@ -123,7 +124,7 @@ ImportProgressDialogGtk::ImportProgressDialogGtk(const string16& source_profile,
NULL);
GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
- gtk_box_set_spacing(GTK_BOX(content_area), 18);
+ gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
GtkWidget* import_info = gtk_label_new(
l10n_util::GetStringFUTF8(IDS_IMPORT_PROGRESS_INFO,
diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc
index 5bf8d49..a291667 100644
--- a/chrome/browser/gtk/options/general_page_gtk.cc
+++ b/chrome/browser/gtk/options/general_page_gtk.cc
@@ -22,15 +22,8 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
-// TODO(mattm): spacing constants should be moved into a system-wide location
namespace {
-// Spacing between options of the same group
-const int kOptionSpacing = 6;
-
-// Horizontal spacing between a label and its control
-const int kLabelSpacing = 12;
-
// Markup for the text showing the current state of the default browser
const char kDefaultBrowserLabelMarkup[] = "<span color='#%s'>%s</span>";
@@ -162,7 +155,7 @@ void GeneralPageGtk::HighlightGroup(OptionsGroup highlight_group) {
// GeneralPageGtk, private:
GtkWidget* GeneralPageGtk::InitStartupGroup() {
- GtkWidget* vbox = gtk_vbox_new(FALSE, kOptionSpacing);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
startup_homepage_radio_ = gtk_radio_button_new_with_label(NULL,
l10n_util::GetStringUTF8(
@@ -186,7 +179,8 @@ GtkWidget* GeneralPageGtk::InitStartupGroup() {
G_CALLBACK(OnStartupRadioToggled), this);
gtk_box_pack_start(GTK_BOX(vbox), startup_custom_radio_, FALSE, FALSE, 0);
- GtkWidget* url_list_container = gtk_hbox_new(FALSE, kOptionSpacing);
+ GtkWidget* url_list_container = gtk_hbox_new(FALSE,
+ gtk_util::kControlSpacing);
gtk_box_pack_start(GTK_BOX(vbox), url_list_container, TRUE, TRUE, 0);
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
@@ -226,7 +220,7 @@ GtkWidget* GeneralPageGtk::InitStartupGroup() {
g_signal_connect(G_OBJECT(startup_custom_pages_selection_), "changed",
G_CALLBACK(OnStartupPagesSelectionChanged), this);
- GtkWidget* url_list_buttons = gtk_vbox_new(FALSE, kOptionSpacing);
+ GtkWidget* url_list_buttons = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
gtk_box_pack_end(GTK_BOX(url_list_container), url_list_buttons,
FALSE, FALSE, 0);
@@ -256,7 +250,7 @@ GtkWidget* GeneralPageGtk::InitStartupGroup() {
}
GtkWidget* GeneralPageGtk::InitHomepageGroup() {
- GtkWidget* vbox = gtk_vbox_new(FALSE, kOptionSpacing);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
homepage_use_newtab_radio_ = gtk_radio_button_new_with_label(NULL,
l10n_util::GetStringUTF8(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB).c_str());
@@ -264,7 +258,7 @@ GtkWidget* GeneralPageGtk::InitHomepageGroup() {
G_CALLBACK(OnNewTabIsHomePageToggled), this);
gtk_container_add(GTK_CONTAINER(vbox), homepage_use_newtab_radio_);
- GtkWidget* homepage_hbox = gtk_hbox_new(FALSE, kLabelSpacing);
+ GtkWidget* homepage_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
gtk_container_add(GTK_CONTAINER(vbox), homepage_hbox);
homepage_use_url_radio_ = gtk_radio_button_new_with_label_from_widget(
@@ -290,7 +284,7 @@ GtkWidget* GeneralPageGtk::InitHomepageGroup() {
}
GtkWidget* GeneralPageGtk::InitDefaultSearchGroup() {
- GtkWidget* hbox = gtk_hbox_new(FALSE, kOptionSpacing);
+ GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing);
// TODO(mattm): hook these up
default_search_engine_combobox_ = gtk_combo_box_new();
@@ -306,7 +300,7 @@ GtkWidget* GeneralPageGtk::InitDefaultSearchGroup() {
}
GtkWidget* GeneralPageGtk::InitDefaultBrowserGroup() {
- GtkWidget* vbox = gtk_vbox_new(FALSE, kOptionSpacing);
+ GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
default_browser_status_label_ = gtk_label_new(NULL);
gtk_box_pack_start(GTK_BOX(vbox), default_browser_status_label_,
diff --git a/chrome/browser/gtk/options/options_layout_gtk.cc b/chrome/browser/gtk/options/options_layout_gtk.cc
index c5bf4a68..0827e81 100644
--- a/chrome/browser/gtk/options/options_layout_gtk.cc
+++ b/chrome/browser/gtk/options/options_layout_gtk.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/gtk/options/options_layout_gtk.h"
+#include "chrome/common/gtk_util.h"
namespace {
@@ -10,23 +11,12 @@ namespace {
const char kGroupTitleMarkup[] =
"<span weight='bold'>%s</span>";
-// Space around the outsides of the page
-const int kBorderSize = 12;
-
-// Indent of the options within each group
-const int kOptionsIndent = 12;
-
-// Spacing between options of the same group
-const int kOptionSpacing = 6;
-
-// Spacing between groups
-const int kGroupSpacing = 18;
-
}
OptionsLayoutBuilderGtk::OptionsLayoutBuilderGtk(int num_rows) {
- page_ = gtk_vbox_new(FALSE, kGroupSpacing);
- gtk_container_set_border_width(GTK_CONTAINER(page_), kBorderSize);
+ page_ = gtk_vbox_new(FALSE, gtk_util::kContentAreaSpacing);
+ gtk_container_set_border_width(GTK_CONTAINER(page_),
+ gtk_util::kContentAreaBorder);
}
void OptionsLayoutBuilderGtk::AddOptionGroup(const std::string& title,
@@ -43,10 +33,10 @@ void OptionsLayoutBuilderGtk::AddOptionGroup(const std::string& title,
GtkWidget* content_alignment = gtk_alignment_new(0.0, 0.5, 1.0, 1.0);
gtk_alignment_set_padding(GTK_ALIGNMENT(content_alignment), 0, 0,
- kOptionsIndent, 0);
+ gtk_util::kGroupIndent, 0);
gtk_container_add(GTK_CONTAINER(content_alignment), content);
- GtkWidget* group = gtk_vbox_new(FALSE, kOptionSpacing);
+ GtkWidget* group = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
gtk_box_pack_start(GTK_BOX(group), title_alignment, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(group), content_alignment);
diff --git a/chrome/browser/gtk/options/options_window_gtk.cc b/chrome/browser/gtk/options/options_window_gtk.cc
index 7ea24f1..a62ed43 100644
--- a/chrome/browser/gtk/options/options_window_gtk.cc
+++ b/chrome/browser/gtk/options/options_window_gtk.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/gtk/options/general_page_gtk.h"
#include "chrome/browser/profile.h"
+#include "chrome/common/gtk_util.h"
#include "chrome/common/pref_member.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
@@ -93,7 +94,8 @@ OptionsWindowGtk::OptionsWindowGtk(Profile* profile)
GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1);
- gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), 18);
+ gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox),
+ gtk_util::kContentAreaSpacing);
notebook_ = gtk_notebook_new();
@@ -119,8 +121,9 @@ OptionsWindowGtk::OptionsWindowGtk(Profile* profile)
}
#endif
- GtkWidget* metrics_vbox = gtk_vbox_new(FALSE, 6);
- gtk_container_set_border_width(GTK_CONTAINER(metrics_vbox), 12);
+ GtkWidget* metrics_vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
+ gtk_container_set_border_width(GTK_CONTAINER(metrics_vbox),
+ gtk_util::kContentAreaBorder);
GtkWidget* metrics = gtk_check_button_new();
GtkWidget* metrics_label = gtk_label_new(
diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc
index 1d4557f..b485544 100644
--- a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc
+++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc
@@ -8,17 +8,12 @@
#include "base/message_loop.h"
#include "chrome/browser/gtk/options/url_picker_dialog_gtk.h"
#include "chrome/browser/net/url_fixer_upper.h"
+#include "chrome/common/gtk_util.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
namespace {
-// Horizontal spacing between a label and its control.
-const int kLabelSpacing = 12;
-
-// Space inside edges of a dialog.
-const int kDialogSpacing = 18;
-
// Initial width for dialog.
const int kDialogDefaultWidth = 450;
@@ -43,7 +38,7 @@ UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback,
gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_OK);
- GtkWidget* url_hbox = gtk_hbox_new(FALSE, kLabelSpacing);
+ GtkWidget* url_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing);
GtkWidget* url_label = gtk_label_new(
l10n_util::GetStringUTF8(IDS_ASI_URL).c_str());
gtk_box_pack_start(GTK_BOX(url_hbox), url_label,
@@ -57,7 +52,8 @@ UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback,
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog_)->vbox), url_hbox);
gtk_window_set_default_size(GTK_WINDOW(dialog_), kDialogDefaultWidth, -1);
- gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), kDialogSpacing);
+ gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox),
+ gtk_util::kContentAreaSpacing);
EnableControls();
diff --git a/chrome/common/gtk_util.h b/chrome/common/gtk_util.h
index d9827d82..5e5a275 100644
--- a/chrome/common/gtk_util.h
+++ b/chrome/common/gtk_util.h
@@ -25,6 +25,24 @@ WindowOpenDisposition DispositionFromEventFlags(guint state);
namespace gtk_util {
+// Constants relating to the layout of dialog windows:
+// (See http://library.gnome.org/devel/hig-book/stable/design-window.html.en)
+
+// Spacing between controls of the same group.
+const int kControlSpacing = 6;
+
+// Horizontal spacing between a label and its control.
+const int kLabelSpacing = 12;
+
+// Indent of the controls within each group.
+const int kGroupIndent = 12;
+
+// Space around the outsides of a dialog's contents.
+const int kContentAreaBorder = 12;
+
+// Spacing between groups of controls.
+const int kContentAreaSpacing = 18;
+
// Create a GtkBin with |child| as its child widget. This bin will paint a
// border of color |color| with the sizes specified in pixels.
GtkWidget* CreateGtkBorderBin(GtkWidget* child, const GdkColor* color,