diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 19:12:13 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 19:12:13 +0000 |
commit | 1490e88528ee6e8e450884016a861c9c1332d022 (patch) | |
tree | 5ee6b38126a67f3140c209fc1da5d8d36190740e /chrome/common | |
parent | d9cd458aa54699e3ea3e01e88d8f75d82764796b (diff) | |
download | chromium_src-1490e88528ee6e8e450884016a861c9c1332d022.zip chromium_src-1490e88528ee6e8e450884016a861c9c1332d022.tar.gz chromium_src-1490e88528ee6e8e450884016a861c9c1332d022.tar.bz2 |
First run bubble polish:
- improve spacing and and sizing, both internally and externally (using windows as the guide)
- make legible for dark themes
- make show delay longer because it was too short on my machine (at least when using a Debug build).
Also explicitly set bookmark bubble labels black.
BUG=16782
TEST=none
Review URL: http://codereview.chromium.org/149664
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/gtk_util.cc | 6 | ||||
-rw-r--r-- | chrome/common/gtk_util.h | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc index 8b7dfd8..1706a12 100644 --- a/chrome/common/gtk_util.cc +++ b/chrome/common/gtk_util.cc @@ -138,7 +138,8 @@ guint32 GetGdkEventTime(GdkEvent* event) { namespace gtk_util { -GtkWidget* CreateLabeledControlsGroup(const char* text, ...) { +GtkWidget* CreateLabeledControlsGroup(const GdkColor* text_color, + const char* text, ...) { va_list ap; va_start(ap, text); GtkWidget* table = gtk_table_new(0, 2, FALSE); @@ -150,6 +151,9 @@ GtkWidget* CreateLabeledControlsGroup(const char* text, ...) { GtkWidget* control = va_arg(ap, GtkWidget*); GtkWidget* label = gtk_label_new(text); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); + if (text_color) + gtk_widget_modify_fg(label, GTK_STATE_NORMAL, text_color); + gtk_table_attach(GTK_TABLE(table), label, 0, 1, row, row + 1, GTK_FILL, GTK_FILL, diff --git a/chrome/common/gtk_util.h b/chrome/common/gtk_util.h index 85bcc4b..6e1c231 100644 --- a/chrome/common/gtk_util.h +++ b/chrome/common/gtk_util.h @@ -51,11 +51,15 @@ const int kContentAreaSpacing = 18; // Create a table of labeled controls, using proper spacing and alignment. // Arguments should be pairs of const char*, GtkWidget*, concluding with a NULL. +// The first argument is a color to force the label text to. It can be NULL to +// get the system default. // For example: -// controls = CreateLabeledControlsGroup("Name:", title_entry_, +// controls = CreateLabeledControlsGroup(&gfx::kGdkBlack, +// "Name:", title_entry_, // "Folder:", folder_combobox_, // NULL); -GtkWidget* CreateLabeledControlsGroup(const char* text, ...); +GtkWidget* CreateLabeledControlsGroup(const GdkColor* color, + const char* text, ...); // Create a GtkBin with |child| as its child widget. This bin will paint a // border of color |color| with the sizes specified in pixels. |