OLD | NEW |
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/common/gtk_util.h" | 5 #include "chrome/common/gtk_util.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/linux_util.h" | 9 #include "base/linux_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 " GtkDialog::action-area-border = 12\n" | 115 " GtkDialog::action-area-border = 12\n" |
116 " GtkDialog::button-spacing = 6\n" | 116 " GtkDialog::button-spacing = 6\n" |
117 " GtkDialog::content-area-spacing = 18\n" | 117 " GtkDialog::content-area-spacing = 18\n" |
118 " GtkDialog::content-area-border = 0\n" | 118 " GtkDialog::content-area-border = 0\n" |
119 "}\n" | 119 "}\n" |
120 "widget \"about-dialog\" style : application \"about-dialog\"\n"; | 120 "widget \"about-dialog\" style : application \"about-dialog\"\n"; |
121 | 121 |
122 gtk_rc_parse_string(kRCText); | 122 gtk_rc_parse_string(kRCText); |
123 } | 123 } |
124 | 124 |
| 125 void CenterWidgetInHBox(GtkWidget* hbox, GtkWidget* widget, bool pack_at_end, |
| 126 int padding) { |
| 127 GtkWidget* centering_vbox = gtk_vbox_new(FALSE, 0); |
| 128 gtk_box_pack_start(GTK_BOX(centering_vbox), widget, TRUE, FALSE, 0); |
| 129 if (pack_at_end) |
| 130 gtk_box_pack_end(GTK_BOX(hbox), centering_vbox, FALSE, FALSE, padding); |
| 131 else |
| 132 gtk_box_pack_start(GTK_BOX(hbox), centering_vbox, FALSE, FALSE, padding); |
| 133 } |
| 134 |
125 } // namespace gtk_util | 135 } // namespace gtk_util |
OLD | NEW |