summaryrefslogtreecommitdiffstats
path: root/chrome/common/gtk_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* linux: set a minimum size for dialogs based on locale resourcesevan@chromium.org2010-01-091-0/+13
| | | | | | | | | | | GTK dialogs size to their contents, but sometimes the title is the longest string available. BUG=28024 Review URL: http://codereview.chromium.org/534006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35855 0039d316-1c4b-4281-b951-d872f2087c98
* Only calculate the GTK scrollbar colors once and then update all ↵erg@google.com2010-01-071-28/+1
| | | | | | | | | | | RenderPreferences on theme change. BUG=10949 TEST=none Review URL: http://codereview.chromium.org/525016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35712 0039d316-1c4b-4281-b951-d872f2087c98
* Fix labels on the content options page to wrap properly. Also, add a ↵zork@chromium.org2009-12-161-0/+10
| | | | | | | | | | | utility function to allow other labels to do the same. BUG=29797 TEST=Open the content options page, and check that the labels wrap at the width of the page. Review URL: http://codereview.chromium.org/500026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34745 0039d316-1c4b-4281-b951-d872f2087c98
* re-apply r34183estade@chromium.org2009-12-101-1/+21
| | | | | | | | | | | | | | | | | | | --------------- linux: theme scrollbars from GTK theme Pick the color of the slider's thumbpart and rail from the GTK theme. We cannot match the exact visual appearance of the GTK theme, as rendering engines can make arbitrary changes to the actual visual appearance. But by sampling a representative set of pixels, we ensure that we will at least match the general color scheme. BUG=10949 patch by <markus [at] chromium> original review: http://codereview.chromium.org/400027/show Review URL: http://codereview.chromium.org/479006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34285 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: hook up drag and drop of browser actions (for reordering).estade@chromium.org2009-12-101-0/+21
| | | | | | | | | | The changes are propagated across open chrome windows, but are not persisted between sessions yet. BUG=26990 Review URL: http://codereview.chromium.org/463056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34272 0039d316-1c4b-4281-b951-d872f2087c98
* rollback r34183estade@chromium.org2009-12-091-21/+1
| | | | | | | | tbr=asargent Review URL: http://codereview.chromium.org/482002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34187 0039d316-1c4b-4281-b951-d872f2087c98
* linux: theme scrollbars from GTK theme estade@chromium.org2009-12-091-1/+21
| | | | | | | | | | | | | | | | Pick the color of the slider's thumbpart and rail from the GTK theme. We cannot match the exact visual appearance of the GTK theme, as rendering engines can make arbitrary changes to the actual visual appearance. But by sampling a representative set of pixels, we ensure that we will at least match the general color scheme. BUG=10949 patch by <markus [at] chromium> original review: http://codereview.chromium.org/400027/show Review URL: http://codereview.chromium.org/466080 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34183 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: add middle click and right click functionality to maximize button.estade@chromium.org2009-12-011-9/+23
| | | | | | | | | | | | If the user right clicks on the maximize button, it will horizontally maximize the window, and if the user middle clicks on the maximize button it will vertically maximize the window. At least on kde, the window manager supports more complicated behavior, e.g. right clicking on a window that is horizontally maximized will return it to its former size. It seems to keep track of multiple restored rects. However, we're not well equipped to replicate this behavior, so I just didn't add it. If the user wants it, they can disable the custom frame. BUG=28881 Review URL: http://codereview.chromium.org/455012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33389 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Dynamically adjust width of download item dangerous warning.estade@chromium.org2009-11-301-6/+18
| | | | | | | | BUG=28707 Review URL: http://codereview.chromium.org/456003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33355 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Create app modal dialogs in a different way to work around a KDE 3 ↵thestig@chromium.org2009-11-241-0/+10
| | | | | | | | | | window manager bug. While we're at it, change dialog's default size to match that of Chrome on Windows. BUG=28230 TEST=see bug Review URL: http://codereview.chromium.org/425016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32905 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix infobubble placement in non-debug builds.derat@chromium.org2009-11-111-4/+10
| | | | | | | | | | | I'd put an important function call inside of a DCHECK(). BUG=27099 TEST=checked that they're placed correctly in release builds now Review URL: http://codereview.chromium.org/389014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31726 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Compute infobubble target rects correctly.derat@chromium.org2009-10-241-0/+9
| | | | | | | | | | | | | | I misunderstood how allocations work in the original version and wasn't handling the case where there are intermediate GdkWindows between the target widget and its toplevel window correctly. TEST=first-run, bookmark, and browser action bubbles get opened in the correct places under xmonad, metacity, and ion3 BUG=23373 Review URL: http://codereview.chromium.org/326017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29978 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Stack autocomplete popup window directly on top of the browser's ↵suzhe@chromium.org2009-10-151-0/+28
| | | | | | | | | | | toplevel window. BUG=19082 "Linux: Omnibox auto-complete popup is on top of IME candidate window when using SCIM" TEST=Please refer to the bug report for how to test. Review URL: http://codereview.chromium.org/274046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29102 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Prevent first-run bubble from getting clipped on high-DPI displays.derat@chromium.org2009-10-091-0/+2
| | | | | | | | | | | | | | | | | | Avoids setting the width of the contents vbox (so it can grow if the combined width of the two buttons exceeds the estimated width of the bubble's text) and fixes an issue where we were getting even-more-bogus estimates due to using an unrealized widget. Also adds a DCHECK() to catch future code that passes unrealized widgets to gtk_util::GetWidgetSizeFromResources() (I checked the existing calls to it and they all look fine). BUG=23367 TEST=tested first-run bubble on displays with various DPIs (75, 120, 200, etc.) Review URL: http://codereview.chromium.org/265023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28500 0039d316-1c4b-4281-b951-d872f2087c98
* Escape ampersands in web view text selection for right click context menu so ↵estade@chromium.org2009-09-161-2/+5
| | | | | | | | | | | | that they don't show up as mnemonics. Also escape underscores in gtk menus so they don't show up as mnemonics (we use ampersands to match windows). BUG=14587 Review URL: http://codereview.chromium.org/203078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26401 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Cache our GdkCursor objects, since building them hits the disk.erg@google.com2009-09-121-0/+40
| | | | | | | | | TEST=strace chrome. Moving the mouse over the webpage shouldn't spew open() calls. BUG=21623 Review URL: http://codereview.chromium.org/195071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26061 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Set the back/forward and bookmark bar menus to always show their images.estade@chromium.org2009-09-111-0/+21
| | | | | | | | | | This only works for GTK 2.16+. BUG=21495 Review URL: http://codereview.chromium.org/199099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26043 0039d316-1c4b-4281-b951-d872f2087c98
* Undo change that crept into my last cl.estade@chromium.org2009-09-111-15/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26017 0039d316-1c4b-4281-b951-d872f2087c98
* Linux focus ring color: Go through WebKit::WebColor api rather than through ↵estade@chromium.org2009-09-111-3/+18
| | | | | | | | | | | | the webview. Also use SkColor isntead of a triplet of colors in RenderPreferences. BUG=21521 Review URL: http://codereview.chromium.org/195059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26013 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Use gtk-cursor-blink from GtkSettings"evan@chromium.org2009-09-091-17/+0
| | | | | | This reverts commit r25797 due to Valgrind errors. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25812 0039d316-1c4b-4281-b951-d872f2087c98
* Use gtk-cursor-blink from GtkSettings to set theevan@chromium.org2009-09-091-0/+17
| | | | | | | | | | | | | | | | caret blink interval on Linux This can be set with the "Cursor Blinking" slider and checkbox in gnome-keyboard-properties. The changed setting will appear in a new renderer, so opening a new tab will see the change. WebKit side is at https://bugs.webkit.org/show_bug.cgi?id=28931 Patch by Joel Stanley <joel@jms.id.au> BUG=20772 Review URL: http://codereview.chromium.org/186009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25797 0039d316-1c4b-4281-b951-d872f2087c98
* Set the focus ring color to match the Gtk theme focus color.estade@chromium.org2009-09-031-0/+9
| | | | | | | | BUG=8540 Review URL: http://codereview.chromium.org/173642 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25278 0039d316-1c4b-4281-b951-d872f2087c98
* Set the initial sizes of several dialogs based on font information.mdm@chromium.org2009-09-021-13/+16
| | | | | | | | | BUG=19622 TEST=none Review URL: http://codereview.chromium.org/180031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25214 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Implement and use x11_util::GetXWindowStack, which is a less flaky and ↵jhawkins@chromium.org2009-09-011-14/+6
| | | | | | | | | | faster version of gdk_screen_get_window_stack. The latter was not consistently returning our browser windows in the window stack. BUG=none TEST=Extensive tab dragging. Review URL: http://codereview.chromium.org/179056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25112 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Set the default icon list so we don't have to set it on every window ↵estade@chromium.org2009-08-271-4/+16
| | | | | | | | all the time. Review URL: http://codereview.chromium.org/174586 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24576 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Fix the find bar so the match count is inside the entry.erg@google.com2009-08-261-0/+41
| | | | | | | | | | In addition, only draw the dirty rectangle area when manually drawing a gtk entry. http://crbug.com/17962 Review URL: http://codereview.chromium.org/174577 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24558 0039d316-1c4b-4281-b951-d872f2087c98
* More interactive test porting for Linux.estade@chromium.org2009-08-211-24/+8
| | | | | | | | | | | Also fix a bug in the Windows implementation of SendMouseMoveNotifyWhenDone where the task would never be run if the cursor was already in the destination position before the call. BUG=19076 BUG=19881 Review URL: http://codereview.chromium.org/174201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24027 0039d316-1c4b-4281-b951-d872f2087c98
* So it turns out that gdk already has a function that does exactly what we want.estade@chromium.org2009-08-121-73/+0
| | | | | | | | http://www.google.com/codesearch/p?hl=en&sa=N&cd=2&ct=rc#eSCqYNcHl48/gtk%2B-2.4.10/gdk/gdkevents.c&q=gdk_event_get_time Review URL: http://codereview.chromium.org/164429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23234 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Popup notification should have transparent rounded corners.erg@google.com2009-08-121-0/+5
| | | | | | | | Also uses the new consistent border color in GTK theme mode. Review URL: http://codereview.chromium.org/165356 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23189 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors drag support from TabContentsViewGtk intosky@chromium.org2009-08-121-0/+13
| | | | | | | | | | | TabContentsDragHandler so that it can be used by both Gtk and Views. BUG=none TEST=none Review URL: http://codereview.chromium.org/165302 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23168 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Pass font settings through to interstitial renderers.derat@chromium.org2009-08-061-0/+56
| | | | | | | | | BUG=18483 TESTED=restarted and visited a page with a broken SSL cert a few times while changing font settings via gnome-appearance-properties Review URL: http://codereview.chromium.org/164094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22679 0039d316-1c4b-4281-b951-d872f2087c98
* linux: rearrange widget layout in importer dialogevan@chromium.org2009-08-051-0/+8
| | | | | | | | | I'm not especially happy with how it looks now, though I think it's better than before. Review URL: http://codereview.chromium.org/160661 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22512 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Theme labels in LocationBarViewGtk.erg@google.com2009-08-031-0/+7
| | | | | | | | | | | Labels in LocationBarViewGtk should be black even when a dark GTK theme is used when we're not in GTK theme mode. Likewise, when we're using a GTK theme, we should have the background and border color of the "Search X for:" box use colors from the theme instead of having hard coded ones. Review URL: http://codereview.chromium.org/159798 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22293 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Add stock icons to some dialog buttons.estade@chromium.org2009-08-031-0/+11
| | | | | | | | | | | | | | | | | To be clear, this only adds button images from stock images, and doesn't change the text of the buttons. I chose APPLY for dialogs that involve checkboxes. I chose OK for dialogs without checkboxes. also - switched the position of the OK/Cancel buttons on the import lock dialog. - changed the first run dialog CANCEL button to QUIT, because CANCEL is really confusing in that situation (this is a problem on windows as well). I couldn't find any other dialogs that are missing button images, but if you see some call em out. BUG=none TEST=look at all the pretty images. Review URL: http://codereview.chromium.org/160493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22288 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: convert classes GtkUtil/GtkTreeUtil back to namespaces ↵mdm@chromium.org2009-07-311-27/+26
| | | | | | | | | | | gtk_util/gtk_tree_util. BUG=none TEST=none Review URL: http://codereview.chromium.org/160417 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22130 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: convert namespace gtk_util to class GtkUtil to meet style guidelines.mdm@chromium.org2009-07-301-26/+27
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/160371 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22036 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Theme the bookmark bubble. (And first run bubble).erg@google.com2009-07-241-4/+4
| | | | | | | | http://crbug.com/16783 Review URL: http://codereview.chromium.org/160025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21535 0039d316-1c4b-4281-b951-d872f2087c98
* Set window icon on options dialog, bookmark manager.estade@chromium.org2009-07-171-0/+11
| | | | | | | | | BUG=16951 TEST=launch bookmark manager on gnome/metacity, observe that window has icon Review URL: http://codereview.chromium.org/155672 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20928 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix a typo introduced in r20778. The logic condition is reversed.jhawkins@chromium.org2009-07-151-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/149704 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20792 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Handle RTL layout when positioning the tab strip drop arrow.jhawkins@chromium.org2009-07-151-0/+7
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/149695 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20778 0039d316-1c4b-4281-b951-d872f2087c98
* First run bubble polish:estade@chromium.org2009-07-151-1/+5
| | | | | | | | | | | | | | | - improve spacing and and sizing, both internally and externally (using windows as the guide) - make legible for dark themes - make show delay longer because it was too short on my machine (at least when using a Debug build). Also explicitly set bookmark bubble labels black. BUG=16782 TEST=none Review URL: http://codereview.chromium.org/149664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20762 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add first run search bubble.kuchhal@chromium.org2009-07-141-0/+21
| | | | | | Review URL: http://codereview.chromium.org/149501 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20625 0039d316-1c4b-4281-b951-d872f2087c98
* linux: port Jankometerevan@chromium.org2009-07-081-0/+73
| | | | | | | | | | | | | Originally I had split it into multiple files, but I think it's cleaner to just use one. (I want to use this for measuring plugin jank.) BUG=8077 Review URL: http://codereview.chromium.org/155194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20130 0039d316-1c4b-4281-b951-d872f2087c98
* Two tab dragging fixes for various window managers:jhawkins@chromium.org2009-06-251-3/+7
| | | | | | | | | | | * Reverse the order of enumeration when enumerating all top-level windows. XQueryTree returns the list of windows in bottom-to-top order, while DockInfo expects the windows in top-to-bottom order (ratpoison WM, Awesome WM). * Extend the enumeration one level deeper for window managers that parent top-level windows into an unnamed real top-level window (ion WM). BUG=14004 TEST=Extensive tab dragging in the following WMs: Metacity, Compiz, kwm, ion3, xmonad, ratpoison, awesome. Review URL: http://codereview.chromium.org/149028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19303 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r19162,19179 as they caused the toolbar and bookmark bar to regress ↵estade@chromium.org2009-06-251-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | and display LTR for RTL locales. r19162 | jhawkins@chromium.org | 2009-06-24 13:15:04 -0700 (Wed, 24 Jun 2009) | 5 lines Add support for RTL languages in the gtk toolbar layout. BUG=none TEST=Open a browser window in a RTL language (--lang=he). The toolbar layout should correctly be in RTL layout. Review URL: http://codereview.chromium.org/147102 r19179 | jhawkins@chromium.org | 2009-06-24 14:38:25 -0700 (Wed, 24 Jun 2009) | 5 lines Add support for RTL languages in the gtk bookmark bar. BUG=none TEST=Open a browser window in a RTL language (--lang=he). The bookmark bar layout should correctly be in RTL layout. Review URL: http://codereview.chromium.org/146105 See http://i139.photobucket.com/albums/q315/failfast/revertrtl.png Review URL: http://codereview.chromium.org/147130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19221 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for RTL languages in the gtk bookmark bar.jhawkins@chromium.org2009-06-241-0/+9
| | | | | | | | BUG=none TEST=Open a browser window in a RTL language (--lang=he). The bookmark bar layout should correctly be in RTL layout. Review URL: http://codereview.chromium.org/146105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19179 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the screen bounds calculation of windowless widgets. Only windowed ↵jhawkins@chromium.org2009-06-241-3/+14
| | | | | | | | | | parent widgets' allocation should be taken into account when calculating the widget screen bounds. BUG=none TEST=Open a browser and set the frame to custom. Drag tabs around. They should not be offset vertically. Review URL: http://codereview.chromium.org/147065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19139 0039d316-1c4b-4281-b951-d872f2087c98
* show back/forward menu on right clickestade@chromium.org2009-06-241-0/+18
| | | | | | | | | http://crbug.com/15100 TEST=do it Review URL: http://codereview.chromium.org/146062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19101 0039d316-1c4b-4281-b951-d872f2087c98
* Don't enumerate unmapped top-level windows. This occurs most often in the ↵jhawkins@chromium.org2009-06-231-0/+3
| | | | | | | | | | Compiz window manager when the browser window is moved partially off-screen. BUG=15023 TEST=Extensive tab dragging in Compiz window manager, including a browser window that is partially off-screen. Review URL: http://codereview.chromium.org/146059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19083 0039d316-1c4b-4281-b951-d872f2087c98
* Handle RTL layout in the gtk tabstrip.jhawkins@chromium.org2009-06-231-0/+8
| | | | | | | | 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