Index: ui/gfx/gtk_util.cc |
=================================================================== |
--- ui/gfx/gtk_util.cc (revision 99756) |
+++ ui/gfx/gtk_util.cc (working copy) |
@@ -219,4 +219,33 @@ |
return new_pixels; |
} |
+void InitRCStyles() { |
+ static const char kRCText[] = |
+ // Make our dialogs styled like the GNOME HIG. |
+ // |
+ // TODO(evanm): content-area-spacing was introduced in a later |
+ // version of GTK, so we need to set that manually on all dialogs. |
+ // Perhaps it would make sense to have a shared FixupDialog() function. |
+ "style \"gnome-dialog\" {\n" |
+ " xthickness = 12\n" |
+ " GtkDialog::action-area-border = 0\n" |
+ " GtkDialog::button-spacing = 6\n" |
+ " GtkDialog::content-area-spacing = 18\n" |
+ " GtkDialog::content-area-border = 12\n" |
+ "}\n" |
+ // Note we set it at the "application" priority, so users can override. |
+ "widget \"GtkDialog\" style : application \"gnome-dialog\"\n" |
+ |
+ // Make our about dialog special, so the image is flush with the edge. |
+ "style \"about-dialog\" {\n" |
+ " GtkDialog::action-area-border = 12\n" |
+ " GtkDialog::button-spacing = 6\n" |
+ " GtkDialog::content-area-spacing = 18\n" |
+ " GtkDialog::content-area-border = 0\n" |
+ "}\n" |
+ "widget \"about-dialog\" style : application \"about-dialog\"\n"; |
+ |
+ gtk_rc_parse_string(kRCText); |
+} |
+ |
} // namespace gfx |