diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 23:35:18 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 23:35:18 +0000 |
commit | 8d3f80e9171c23d5c998af155da4ad8ce3b63802 (patch) | |
tree | ae1b98d5b16daded7133e41152696dcd0337df78 /chrome/browser/gtk/custom_button.cc | |
parent | 7bc61d31c08b04d429ff3ba6190ddabda341c3f5 (diff) | |
download | chromium_src-8d3f80e9171c23d5c998af155da4ad8ce3b63802.zip chromium_src-8d3f80e9171c23d5c998af155da4ad8ce3b63802.tar.gz chromium_src-8d3f80e9171c23d5c998af155da4ad8ce3b63802.tar.bz2 |
Paint a focus indication on LinkButtonGtk buttons.
Also, rearrange helper code for centering things in hboxes so they don't expand to take up the full vertical space.
Also, don't allow focus on gtk_chrome_button buttons. This is to prevent the "Other bookmarks" button from getting focus (which matches windows) and is in line with disallowing focus on all custom chrome buttons (see CustomDrawButton).
BUG=12829
TEST=everything should look the same. Also if you tab to focus on a link button (e.g. download shelf's "show all downloads"), it should have a dotted line around the exterior.
Review URL: http://codereview.chromium.org/113970
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/custom_button.cc')
-rw-r--r-- | chrome/browser/gtk/custom_button.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/browser/gtk/custom_button.cc b/chrome/browser/gtk/custom_button.cc index e438016..00bbfda 100644 --- a/chrome/browser/gtk/custom_button.cc +++ b/chrome/browser/gtk/custom_button.cc @@ -93,13 +93,7 @@ gboolean CustomDrawButton::OnExpose(GtkWidget* widget, } // static -CustomDrawButton* CustomDrawButton::AddBarCloseButton(GtkWidget* hbox, - int padding) { - 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, padding); - return rv; +CustomDrawButton* CustomDrawButton::CloseButton() { + return new CustomDrawButton(IDR_CLOSE_BAR, IDR_CLOSE_BAR_P, + IDR_CLOSE_BAR_H, 0); } |