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

Unified Diff: chrome/common/gtk_util.cc

Issue 113539: linux: unify all the dialog layout code for visual consistency. (Closed)
Patch Set: last second Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/gtk_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gtk_util.cc
diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
index f0d5ea1b2992f0f1bf5f8aa41039912e2de7f55a..4b25a4b095b5414c628692ef47b5037119e58723 100644
--- a/chrome/common/gtk_util.cc
+++ b/chrome/common/gtk_util.cc
@@ -54,4 +54,32 @@ void RemoveAllChildren(GtkWidget* container) {
gtk_container_foreach(GTK_CONTAINER(container), RemoveWidget, container);
}
+void InitRCStyles() {
+ static const char kRCText[] =
+ // Make our dialogs styled like the GNOME HIG.
+ // TODO(evanm): content-area-spacing doesn't seem to work -- maybe it
+ // was introduced in a later version of GTK?
+ "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.
+ "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"
+ // Note we set it at the "application" priority, so users can override.
+ "widget \"about-dialog\" style : application \"about-dialog\"\n";
+
+ gtk_rc_parse_string(kRCText);
+}
+
} // namespace gtk_util
« no previous file with comments | « chrome/common/gtk_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698