diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-06 23:33:08 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-06 23:33:08 +0000 |
commit | 3dda0dcf7d4856d598a2a0e7553e71dbd59134eb (patch) | |
tree | a9f2f93ce239ff603b05f900e34fa6a2a460227b /chrome/browser/gtk/custom_button.cc | |
parent | ae0f44dd31b81be0d9e0ef5d4478e0ef5ca2805d (diff) | |
download | chromium_src-3dda0dcf7d4856d598a2a0e7553e71dbd59134eb.zip chromium_src-3dda0dcf7d4856d598a2a0e7553e71dbd59134eb.tar.gz chromium_src-3dda0dcf7d4856d598a2a0e7553e71dbd59134eb.tar.bz2 |
Basic infobars on linux.
All infobars consist of nothing but a non-functioning close button.
Review URL: http://codereview.chromium.org/62070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/custom_button.cc')
-rw-r--r-- | chrome/browser/gtk/custom_button.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/gtk/custom_button.cc b/chrome/browser/gtk/custom_button.cc index e3d45d2..150d29f 100644 --- a/chrome/browser/gtk/custom_button.cc +++ b/chrome/browser/gtk/custom_button.cc @@ -66,6 +66,17 @@ gboolean CustomDrawButton::OnExpose(GtkWidget* widget, GdkEventExpose* e, return TRUE; } +// static +CustomDrawButton* CustomDrawButton::AddBarCloseButton(GtkWidget* hbox) { + CustomDrawButton* rv = new CustomDrawButton(IDR_CLOSE_BAR, IDR_CLOSE_BAR_P, + IDR_CLOSE_BAR_H, 0); + GTK_WIDGET_UNSET_FLAGS(rv->widget(), GTK_CAN_FOCUS); + GtkWidget* centering_vbox = gtk_vbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(centering_vbox), rv->widget(), TRUE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(hbox), centering_vbox, FALSE, FALSE, 0); + return rv; +} + CustomContainerButton::CustomContainerButton() { GdkPixbuf* images[9]; int i = 0; |