summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/custom_button.h
Commit message (Collapse)AuthorAgeFilesLines
* Reapplies the GdkPixbuf -> cairo surface patch.erg@google.com2009-09-101-4/+7
| | | | | | | | | | | | | Only difference is explicitly calling a FreePerDisplaySurfaces() function from ~GtkThemeProvider() because vtables are set to base class during destructor calling. BUG=http://crbug.com/10499 Original Review URL: http://codereview.chromium.org/197046 Review URL: http://codereview.chromium.org/199077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25880 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Upload GdkPixbufs into cairo surfaces so they (hopefully) live on the Xerg@google.com2009-09-101-7/+4
| | | | | | | | | | | | | server and have better performance. In the presence of XRender, let cairo do things smarter." Valgrind problems. This reverts commit 03871714c3e5b39ee0f8369ecc2313c02fe0ca08 (r25814). Review URL: http://codereview.chromium.org/200071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25828 0039d316-1c4b-4281-b951-d872f2087c98
* Upload GdkPixbufs into cairo surfaces so they (hopefully) live on the X ↵erg@google.com2009-09-091-4/+7
| | | | | | | | | | | | | | server and have better performance. In the presence of XRender, let cairo do things smarter. This is a big win performance wise. BrowserWindowGtk::OnCustomFrameExpose, a heavy user of images sped up from an average runtime of 20.5ms to 0.7ms. TEST=Run through valgrind, don't leak memory. TEST=Run both before and after using xtrace. Notice fewer XCreatePixmap requests and more XRender-CreatePicture requests. BUG=http://crbug.com/10499 Review URL: http://codereview.chromium.org/197046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25814 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Let custom draw buttons specify their stock size as well as their stock ↵estade@chromium.org2009-07-241-4/+5
| | | | | | | | | | | | | image. I tried to also make the tab strip use stock gtk close button but that is gonna require a lot more work to get layout right so leave it alone for now. BUG=none TEST=close button on download shelf is sanely sized Review URL: http://codereview.chromium.org/159325 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21575 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Theme the tab close button.jhawkins@chromium.org2009-07-241-0/+10
| | | | | | | | BUG=none TEST=Open a browser window. The close button should be visible. Apply a theme with a colored close button. The close button color should match the theme. Review URL: http://codereview.chromium.org/159338 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21542 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Use the GTK close button in the download shelf and popup ↵erg@google.com2009-07-231-5/+6
| | | | | | | | notification. Review URL: http://codereview.chromium.org/155939 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21394 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Fixes button state on pressed back/forward buttons and toolbar ↵erg@google.com2009-07-211-3/+3
| | | | | | | | | | | | | | | | | items. This patch fixes two related problems: 1) Holding down back/forward now stay pressed while the menu is shown. 2) Buttons on the "toolbar" now emulate GTK's toolbar behaviour of only showing the border on hover. http://crbug.com/17308 http://crbug.com/17340 Review URL: http://codereview.chromium.org/159154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21233 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Refactored to use notifications instead of manual plumbing.erg@google.com2009-07-131-11/+17
| | | | | | | | | | | | - Removes large amounts of plumbing because: - All GtkChromeButtons are constructed from GtkThemeProvider which keeps a reference to all live buttons and sends them theme change notifications. - CustomDrawButtons now subscribe themselves to the BROWSER_THEME_CHANGED notification; this gets rid of a LOT of plubming. - Removes the GtkThemeProperties struct; just pass the theme provider around. - Move all the constants from the themes namespace to class statics, per tony's suggestion Review URL: http://codereview.chromium.org/149547 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20561 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert "Add button tinting to the toolbar buttons.""tc@google.com2009-07-101-3/+37
| | | | | | | | | | | | | This reverts commit r20399 and re-applies the button tinting code. There's a fix for the go button gtk unittest by checking to see if the browser is non-NULL before getting the theme provider. TBR=erg Review URL: http://codereview.chromium.org/155369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20402 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add button tinting to the toolbar buttons."tc@google.com2009-07-101-37/+3
| | | | | | | | | | | This reverts commit r20396. TBR=erg Review URL: http://codereview.chromium.org/155367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20399 0039d316-1c4b-4281-b951-d872f2087c98
* Add button tinting to the toolbar buttons.tc@google.com2009-07-101-3/+37
| | | | | | | | | | | | | | | | Make CustomDrawButtonBase aware of the ThemeProvider. If the theme changes, we reload new pixbufs from the ThemeProvider. This breaks RTL of the toolbar buttons, I'll add that back in a follow up change to BrowserThemeProvider. BUG=15506 TEST=Change themes or set the GTK+ theme. The star button and go button should be tinted according to the theme (other buttons as well if not using GTK+ buttons). Review URL: http://codereview.chromium.org/149432 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20396 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Initial implementation of using GTK themes, partially based on evan's ↵erg@google.com2009-07-031-6/+20
| | | | | | | | | | | | | | | | | | | | | | | CL 118358. A lot of stuff works: - Colors are picked out of the GTK theme. - Buttons use the current GTK button theme. - We use the user's icon theme. A lot of stuff doesn't: - We could do a better job of picking colors for the skylines. - The omnibox hasn't been touched. - UI that's not part of the toolbar hasn't been touched. - We currently fail on themes like HighContrastInverse. TEST=Under Options>Personal Stuff, click GTK Theme. Colors and widgets should be rendered with the current GTK theme stuff. TEST=With chrome open and in GTK Theme mode, change your GTK theme or icon theme. chrome should pick up on the change immediately and reimport the colors and images. http://crbug.com/13967 Review URL: http://codereview.chromium.org/150176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19868 0039d316-1c4b-4281-b951-d872f2087c98
* Add a function to ResourceBundle to allow loading images that will mirror in ↵estade@chromium.org2009-06-251-2/+0
| | | | | | | | | | RTL. Use this function for custom buttons and for the Off the Record avatar. for reference, this will be a bit different than Views, which does it per class rather than per image: http://dev.chromium.org/developers/design-documents/ui-mirroring-infrastructure Review URL: http://codereview.chromium.org/147157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19309 0039d316-1c4b-4281-b951-d872f2087c98
* Handle RTL layout in the gtk tabstrip.jhawkins@chromium.org2009-06-231-0/+1
| | | | | | | | BUG=none TEST=Open the browser with --lang=he and make sure the tabs are ordered starting from the right. Also, the UI elements in the tabs should be reversed as well. Review URL: http://codereview.chromium.org/147020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19051 0039d316-1c4b-4281-b951-d872f2087c98
* Implement and use the -> operator for OwnedWidgetGtk.thestig@chromium.org2009-06-051-5/+5
| | | | | | | | | | Also change dragged_tabs_gtk's container_ to be a OwnedWidgetGtk just to be on the safe side. BUG=none TEST=none Review URL: http://codereview.chromium.org/119221 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17790 0039d316-1c4b-4281-b951-d872f2087c98
* Paint a focus indication on LinkButtonGtk buttons.estade@chromium.org2009-05-281-5/+2
| | | | | | | | | | | | | 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
* Refactor back/forward buttons to their own class. Fix them so the menu pops ↵estade@chromium.org2009-05-261-0/+12
| | | | | | | | | | | up on drags and the buttons look depressed when the menu is showing. BUG=12427 TEST=back/forward button behavior should be as on windows (see bug desc. for details). Review URL: http://codereview.chromium.org/113806 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16898 0039d316-1c4b-4281-b951-d872f2087c98
* Implement Linux tabs as widgets. This moves tab input handling into the ↵jhawkins@chromium.org2009-05-051-0/+10
| | | | | | | | correct object. This change also adds an initial DraggedTabControllerGtk. Review URL: http://codereview.chromium.org/99371 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15330 0039d316-1c4b-4281-b951-d872f2087c98
* Make the Linux find bar look a bit better.deanm@chromium.org2009-05-041-1/+1
| | | | | | | | | | - Fake some anti-aliasing so the text entry matches the next/prev images. - Match padding pixel perfect with Windows. Review URL: http://codereview.chromium.org/99275 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15217 0039d316-1c4b-4281-b951-d872f2087c98
* Make CustomContainerButton a gtk widget.erg@google.com2009-04-091-23/+0
| | | | | | Review URL: http://codereview.chromium.org/62171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13452 0039d316-1c4b-4281-b951-d872f2087c98
* Implement stop/go button for Linux.willchan@chromium.org2009-04-091-4/+28
| | | | | | | | | | | | | Refactored code out of CustomDrawButton into CustomDrawButtonBase to be shared with GoButtonGtk. Replaced the existing non-togglable go button with GoButtonGtk. Note that tooltip support isn't done yet, as it changes based on the state of the location bar and the go/stop state. Add a simple test. Fix some minor lint errors. BUG=9381 Review URL: http://codereview.chromium.org/62154 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13409 0039d316-1c4b-4281-b951-d872f2087c98
* Basic infobars on linux.estade@chromium.org2009-04-061-0/+6
| | | | | | | | 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
* First implementation of a bookmark bar.erg@google.com2009-04-061-4/+5
| | | | | | | | | | | Currently, the bookmark bar only reads state on startup so to see this work, you have to go to a page, click the star button (that isn't hooked up yet either), and then restart chromium. Review URL: http://codereview.chromium.org/60071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13193 0039d316-1c4b-4281-b951-d872f2087c98
* Draw custom menu buttons properly.evan@chromium.org2009-02-201-5/+31
| | | | | | | | | | This is an iterative process towards code to be proud of; the previous code of mine was horrible, this is less bad, and my next attempt at it will be pretty, I promise. Review URL: http://codereview.chromium.org/28001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10111 0039d316-1c4b-4281-b951-d872f2087c98
* Relocate custom button code to its own files, in anticipation of more changes.evan@chromium.org2009-02-191-0/+44
(Next is to fix the menu buttons.) Review URL: http://codereview.chromium.org/20509 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10053 0039d316-1c4b-4281-b951-d872f2087c98