summaryrefslogtreecommitdiffstats
path: root/views
Commit message (Collapse)AuthorAgeFilesLines
* Tweaks for the merged menu:sky@chromium.org2010-06-178-27/+75
| | | | | | | | | | | | | | | | | | | | | . makes the menu show the same fonts regardless of whether the item has children. . adds text color to MenuConfig. I'm going to use this for the buttons added to the menu. . Changes TextButton to update text_size_ when the font changes. . Changes TextButton to allow you to specify how accelerators are shown. . Nukes TextButton::OnMousePressed as it's not needed (super implementation does the right thing and updates state the TextButton::OnMousePressed wasn't). . Changes accelerator to have constructor taking keycode and modifiers. BUG=45734 TEST=none Review URL: http://codereview.chromium.org/2833013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50108 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for UI issues on AutoFill dialog on Windows.georgey@chromium.org2010-06-162-2/+10
| | | | | | | | BUG=46525 TEST=In the bug. Review URL: http://codereview.chromium.org/2802005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50040 0039d316-1c4b-4281-b951-d872f2087c98
* Add accessibility support for Textfields in Windows.dtseng@chromium.org2010-06-162-0/+84
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2791003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49955 0039d316-1c4b-4281-b951-d872f2087c98
* Allow widgets to have keyboard shortcuts.avayvod@chromium.org2010-06-163-24/+7
| | | | | | | | | BUG=cros:3956 TEST=Check that keyboard shortcuts work on login screens. Review URL: http://codereview.chromium.org/2857004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49929 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt 2 at:sky@chromium.org2010-06-156-21/+163
| | | | | | | | | | | | | | | | Changes the tab close button to a dot, unless you're near the button or the tab is selected. The only difference between this and the first is that I missed a remove from the set if the view was deleted, which resulted in a crash. I've added an interactive test case that covers this. BUG=45743 TEST=none Review URL: http://codereview.chromium.org/2863003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49828 0039d316-1c4b-4281-b951-d872f2087c98
* Unicode bidi mirroring characters are not correctly mirrored in textfield ↵xji@chromium.org2010-06-152-12/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and omnibox (which use CRichEditCtrl) while *inputting*. Since bidi mirroring characters are correctly mirrored when rendering the whole text, fix it by re-rendering the whole text every time the text changes. NOTE: this change will mess up the undo queue. The continuous keystroke wont be treated as one undo event. Every single keystroke is treated as a undo state. Using the following as example: 1. paste string "abcd " into find-in-page; 2. type in 'e', 'f', and ' '. 3. paste string "xyz". When undo, the string sequence will be: "abcd ef xyz" => "abcd ef " ==> "abcd ef" ==> "abcd e" ==> "abcd " =>"". Without the change, the string sequence is: "abcd ef xyz" => "abcd ef " => "abcd " =>"". BUG=46298 TEST=follow the steps described in the bug. Review URL: http://codereview.chromium.org/2741007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49811 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 49795 - Changes the tab close button to a dot, unless you're near the ↵sky@chromium.org2010-06-156-162/+21
| | | | | | | | | | | | | | | | | | | button or the tab is selected. I'm not to keen on the mouse near names, if you have better ideas please say so. BUG=45743 TEST=none Review URL: http://codereview.chromium.org/2796006 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/2823005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49801 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the tab close button to a dot, unless you're near the buttonsky@chromium.org2010-06-156-21/+162
| | | | | | | | | | | | | | or the tab is selected. I'm not to keen on the mouse near names, if you have better ideas please say so. BUG=45743 TEST=none Review URL: http://codereview.chromium.org/2796006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49795 0039d316-1c4b-4281-b951-d872f2087c98
* Notification balloons don't want the WS_EX_LAYOUTRTL style flag, since the ↵johnnyg@chromium.org2010-06-144-5/+20
| | | | | | | | | | | directionality of the content is specified already inside the HTML. BUG=46170 TEST=create a notification while using an RTL language for Chrome UI. Review URL: http://codereview.chromium.org/2794001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49723 0039d316-1c4b-4281-b951-d872f2087c98
* Fix tooltip wrap problem per chromium-os:4042xiyuan@chromium.org2010-06-141-5/+0
| | | | | | | | | | | Remove the max width chars logic and let GtkLabel decide how to wrap. BUG=chromium-os:4042 TEST=Verify fix for chromium-os:4042 Review URL: http://codereview.chromium.org/2832003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49721 0039d316-1c4b-4281-b951-d872f2087c98
* Draw transparent background on window_content() only for TYPE_CHILD.oshima@chromium.org2010-06-111-2/+2
| | | | | | | | | | | Transparent background is draws on GtkWindow for window types. This was necessary only for TYPE_CHILD. BUG=43611 TEST=type something in address bar and you'll see no flicker on dropdown. Review URL: http://codereview.chromium.org/2797001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49581 0039d316-1c4b-4281-b951-d872f2087c98
* Same issue as in omnibox, keyboard layout change inside DefWindowProc() inxji@chromium.org2010-06-101-2/+23
| | | | | | | | | | | | NativeTextfieldWin::HandleKeystroke(). Restore keyboard layout after DefWindowProc(). BUG=14049 TEST=open find-in-page, type in pure Hebrew, press HOME/END/shift-HOME/shift-END, keyboard layout should not be changed. Review URL: http://codereview.chromium.org/2738008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49455 0039d316-1c4b-4281-b951-d872f2087c98
* Adds support for showing accelerators in bookmark menus.sky@chromium.org2010-06-0910-25/+122
| | | | | | | | | BUG=45734 TEST=none Review URL: http://codereview.chromium.org/2742003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49335 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup of about boxseanparent@google.com2010-06-093-1/+14
| | | | | | | | | | | | | | | | | Removed redundent version from update string. Added a line break to the ChromeOS version on test builds to improve appearence (select and drag to see complete version). Added margins to multiline edit fields without borders to make them match single line edit fields in positioning. Fixed an issue with setting the initial focus for GTK based windows. This fixes the problem of the cursor showing up in the version field. BUG=chromium-os:3571 1589 2967 TEST=none Review URL: http://codereview.chromium.org/2620003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49322 0039d316-1c4b-4281-b951-d872f2087c98
* Makes it so child views of menuitemview can be traversed with thesky@chromium.org2010-06-0915-56/+250
| | | | | | | | | | | | | keyboard. Because I don't want the menu to actually get focus I'm using SetHotTracked when traversing and AcceleratorPressed from enter/return. BUG=45734 TEST=none Review URL: http://codereview.chromium.org/2741004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49270 0039d316-1c4b-4281-b951-d872f2087c98
* Draw composited widget's content only after something is drawn.oshima@chromium.org2010-06-091-5/+9
| | | | | | | | | | | This was causing ugly flicker when screen locker is shown. BUG=none TEST=none Review URL: http://codereview.chromium.org/2717002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49232 0039d316-1c4b-4281-b951-d872f2087c98
* MessageBubble which does not require separate window and does not grab input ↵oshima@chromium.org2010-06-072-13/+14
| | | | | | | | | | | | | | | | | | | | on mouse press event. * Added new constructor to InfoBubble for chromeos which takes WidgetGtk::Type parameter * Made DoGrab/HandleGrabBroke so that subclass can customize its behavior. * Added MessageBubble::ShowNoGrab that shows a child MessageBubble which does not grab input on mouse press event. * Explicitly remove accelerator when closed. This is necessary for child, but doing for all case as it's harmless to do so. * Moved HandleGrabBroke to protected and made virtual so that sub class can trap the event. ScreenLocker will use this event to detect this. This will be used for screen locker. BUG=none TEST=none Review URL: http://codereview.chromium.org/2682004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49068 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use FRIEND_TEST_ALL_PREFIXES.tfarina@chromium.org2010-06-051-5/+5
| | | | | | | | | BUG=44549 TEST=trybots Review URL: http://codereview.chromium.org/2699003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49011 0039d316-1c4b-4281-b951-d872f2087c98
* Add cross platform Widget::InitWithWidget(parent, const gfx::Rect& bounds);oshima@chromium.org2010-06-057-10/+32
| | | | | | | | | | | | | On linux, native parent has to be either window_contents or widget depending of the type of wiget. InitWithWidget takes a parent Widget instead of native and hides these details. I also cleaned up a few dead/duplicated code. BUG=none TEST=none Review URL: http://codereview.chromium.org/2355003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48990 0039d316-1c4b-4281-b951-d872f2087c98
* Create CompositePainter once for a widget instead of ref count.oshima@chromium.org2010-06-021-26/+14
| | | | | | | | | | | | | | | There is a issue in adding new composited child after the ref count of painter became zero. RefCount::Release does not tell if it's been deleted so it can't remove the painter key from G_OBJECT(widget). I could have changed RefCounted::Release to return true, but I took this approach because new child will be added later in most use case (like info bubble), and it's more efficient to keep the painter rather than creating and deleting each time. BUG=none TEST=none Review URL: http://codereview.chromium.org/2449010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48757 0039d316-1c4b-4281-b951-d872f2087c98
* Added const to image parameters for ImageButton class.avayvod@google.com2010-06-022-10/+13
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2418003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48748 0039d316-1c4b-4281-b951-d872f2087c98
* Process accelerators if grabbed widget is a window.xiyuan@chromium.org2010-06-021-4/+17
| | | | | | | | | | | Update the gtk event filtering logic to process key events for grabbed window (i.e. modal dialog). BUG=chromium-os:3701 TEST=Verify fix for chromium-os:3701. Review URL: http://codereview.chromium.org/2455004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48742 0039d316-1c4b-4281-b951-d872f2087c98
* views: implement a TODO to move WidgetGtk::GetWindowForNative to WindowGtk.tfarina@chromium.org2010-06-025-25/+24
| | | | | | | | | BUG=NONE TEST=compiles. Review URL: http://codereview.chromium.org/1640003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48717 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing AutoReset to be a template.gspencer@chromium.org2010-06-012-2/+2
| | | | | | | | | | | I've run into a couple of times this week when I needed one of these, for two different types besides bool. Time to fix the TODO. TEST=trybots FTW, and built locally. BUG=none Review URL: http://codereview.chromium.org/2394001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48644 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move BoxLayout class into views/examples directory.tfarina@chromium.org2010-05-284-58/+95
| | | | | | | | | | | Also add horizontal support as well. BUG=None TEST=out/Debug/view_examples, see Widget tab. Review URL: http://codereview.chromium.org/2145001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48460 0039d316-1c4b-4281-b951-d872f2087c98
* Initial work to fix the IAccessible tree in circumstances where there is a ↵ctguil@chromium.org2010-05-2710-31/+78
| | | | | | | | | | widget not at the root of the UI heirarchy. Also contains misc fixes for setting correct name/role for controls found in the Options dialog. BUG=9621 TEST=none Review URL: http://codereview.chromium.org/2174002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48444 0039d316-1c4b-4281-b951-d872f2087c98
* Enable warning 4389 as an error on windows builds. This will make mbelshe@chromium.org2010-05-271-1/+1
| | | | | | | | | | | | windows builds more similar to linux/mac, which already treat signed/ unsigned equality comparisons as warnings (and hence errors). BUG=44471 TEST=none Review URL: http://codereview.chromium.org/2222002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48395 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Another dependency the bbot missed!!!"rafaelw@chromium.org2010-05-261-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 161f7fd3bdd425167af9fe26fdc5373a2ff44c98. Revert "Missed a file as part of checkin for r48186" This reverts commit cff86beba5938209393a6c3bccced62a7f3ff36b. Revert "Enable warning 4389 as an error on windows builds. This will make" This reverts commit c78936bcfc65b98edf288191d927a495b0364621. TBR=mbelshe Review URL: http://codereview.chromium.org/2253001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48238 0039d316-1c4b-4281-b951-d872f2087c98
* Add bug number in comments for each TreeViewTest marked as FAILSrafaelw@chromium.org2010-05-251-1/+11
| | | | | | | | | TBR=phajdan.jr TEST=NONE Review URL: http://codereview.chromium.org/2223001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48214 0039d316-1c4b-4281-b951-d872f2087c98
* Enable warning 4389 as an error on windows builds. This will makembelshe@chromium.org2010-05-251-1/+1
| | | | | | | | | | | | windows builds more similar to linux/mac, which already treat signed/ unsigned equality comparisons as warnings (and hence errors). BUG=44471 TEST=none Review URL: http://codereview.chromium.org/2081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48186 0039d316-1c4b-4281-b951-d872f2087c98
* Bound checkingon TableViewjcivelli@chromium.org2010-05-253-29/+43
| | | | | | | | | | Adding bound checking to View <-> Model methods to investigate unit-tests failures. BUG=None TEST=unit-tests should still pass Review URL: http://codereview.chromium.org/2069019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48185 0039d316-1c4b-4281-b951-d872f2087c98
* Mark TreeViewTests as FAILS_ rather than DISABLED_rafaelw@chromium.org2010-05-251-11/+12
| | | | | | | | | TBR=jcivelli BUG=45015 Review URL: http://codereview.chromium.org/2171006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48168 0039d316-1c4b-4281-b951-d872f2087c98
* Disabling TableViewTests (failing on vista)rafaelw@chromium.org2010-05-251-9/+9
| | | | | | | | TBR=jcivelli Review URL: http://codereview.chromium.org/2112017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48164 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a couple of leaks in use of gdk_get_property.sky@chromium.org2010-05-251-0/+1
| | | | | | | | | BUG=44945 TEST=none Review URL: http://codereview.chromium.org/2089024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48161 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed alt key as shortcut to focus menus on linux/views. It should onlydmazzoni@chromium.org2010-05-243-21/+239
| | | | | | | | | | | | trigger when you press and release Alt and no other keys. Previously it could trigger when Alt was released as part of some other key combination. BUG=40754 TEST=Added new test, accelerator_handler_gtk_unittest.cc Review URL: http://codereview.chromium.org/2128011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48095 0039d316-1c4b-4281-b951-d872f2087c98
* Add multiline support to views::TextField.xiyuan@chromium.org2010-05-225-41/+309
| | | | | | | | | | | | | | - Add a GtkViewsTextView derived from GtkTextView and supports border and info text when empty; - Update NativeTextfieldGtk to use GtkViewsTextView for multiline text; - Remove the multiline suppression in BugReportView; BUG=chromium-os:3426 TEST=Verify feedback dialog on ChromeOS uses multiline text edit for description field. Review URL: http://codereview.chromium.org/2138003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47986 0039d316-1c4b-4281-b951-d872f2087c98
* Revert revisions 47902 and 47900.dpolukhin@chromium.org2010-05-211-10/+5
| | | | | | | | | | | | Chrome UI blinks after replacement of gtk_widget_set_size_request with gtk_widget_size_allocate on resizing or infobar appearing animation. It happens because gtk_widget_size_allocate results in background resizing on message loop idle. It looks like we can't use gtk_widget_size_allocate at this place at all. Review URL: http://codereview.chromium.org/2131021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47913 0039d316-1c4b-4281-b951-d872f2087c98
* NativeViewHostGtk should use gtk_views_fixed instead of gtk_fixeddpolukhin@chromium.org2010-05-211-5/+10
| | | | | | | | | | | | and avoid calling gtk_widget_set_size_request to don't spoil preferred size for native controls. BUG=crosbug.com/2876 TEST=See bug description. Review URL: http://codereview.chromium.org/2068006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47900 0039d316-1c4b-4281-b951-d872f2087c98
* views: Use STLDeleteElements to delete pointer objects.tfarina@chromium.org2010-05-211-17/+6
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/2135002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47879 0039d316-1c4b-4281-b951-d872f2087c98
* Elide the EV bubble when it's extremely long. This limits it to half the ↵pkasting@chromium.org2010-05-203-16/+35
| | | | | | | | | | location bar width, unless eliding to that would result in a width of less than 150 px. BUG=42856 TEST=Visit https://www.barbican.org.uk/eticketing/index.asp and make the window smaller. The EV bubble should shrink, eliding in middle, until it hits a minimum size. Review URL: http://codereview.chromium.org/2084012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47819 0039d316-1c4b-4281-b951-d872f2087c98
* Views menu gradient change for ChromeOS to sync with gtk theme change.xiyuan@chromium.org2010-05-201-5/+3
| | | | | | | | | BUG=chromium-os:2691 TEST=Verify views menu on bookmark bar etc also use the subtle gradient. Review URL: http://codereview.chromium.org/2117017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47803 0039d316-1c4b-4281-b951-d872f2087c98
* Clear password field when navigating though users on the login screen.nkostylev@google.com2010-05-203-3/+12
| | | | | | | | | BUG=chromium-os:2319 TEST=Enter password on the login screen. Navigate to the left/right user window. Navigate back. Password field should be empty. Review URL: http://codereview.chromium.org/2132011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47785 0039d316-1c4b-4281-b951-d872f2087c98
* A crasher would sometimes happen when opening a selet file dialogjcivelli@chromium.org2010-05-191-0/+5
| | | | | | | | | | | | | | | | | | | (such as when loading an unpacled extension). This is because we would reinterpret cast the user data of the HWND to a WidgetWin, and in that case the Windows dialog has a user-data that we did not set. This CL checks that the HWND is at least a WindowImpl before attempting to retrieve the WidgetWin, ensuring we won't mess with windows we did not create directly. BUG=44312 TEST=Open the extension page. Move the focus by pressing TAB to the "Load unpacked extension..." button. Press ENTER many times quickly so it opens/closes the "Select dir" dialog. It should not crash. Review URL: http://codereview.chromium.org/2124009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47672 0039d316-1c4b-4281-b951-d872f2087c98
* Provide accessibility support for Window_win.ctguil@chromium.org2010-05-178-62/+139
| | | | | | | | TEST=Ensure that the About Chrome dialog has proper accessibility role. BUG=none Review URL: http://codereview.chromium.org/1838002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47454 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors TabStrip code for better sharing between TabStrip andsky@chromium.org2010-05-132-2/+2
| | | | | | | | | | | | SideTabStrip. I still have a bunch of cleanup to do, but this is a good checkpoint. BUG=none TEST=none Review URL: http://codereview.chromium.org/2037012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47202 0039d316-1c4b-4281-b951-d872f2087c98
* Re-organize RenderViewContextMenu to the use cross-platform MenuModel class.estade@chromium.org2010-05-111-1/+1
| | | | | | | | | | | | | | | | | | Benefits: - less code - more straightforward code - more shared code unresolved issues: - RenderViewContextMenu{Gtk,Mac,Views} should not be a subclass of RenderViewContextMenu - On Linux, IMEs are added in the wrong place (not near the other editable stuff) BUG=31365 TEST=manual + trybots Review URL: http://codereview.chromium.org/2017001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46987 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible crash when menus were destroyed. I wasn't resetting asky@chromium.org2010-05-111-0/+2
| | | | | | | | | | | pointer, leading to bad data write on destruction. BUG=42513 TEST=see bug Review URL: http://codereview.chromium.org/2013016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46974 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate View::UILayoutIsRightToLeft() to standardize on ↵pkasting@chromium.org2010-05-1018-63/+33
| | | | | | | | | | base::i18n::IsRTL(). Was only needed for EnableUIMirroringForRTLLanguages(), which was only used by Views::Label, which already had this capability via set_rtl_alignment_mode(). BUG=none TEST=none Review URL: http://codereview.chromium.org/1991002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46869 0039d316-1c4b-4281-b951-d872f2087c98
* Fix build failure due to bad merge resolvepkasting@chromium.org2010-05-101-1/+1
| | | | | | | | BUG=43259 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46834 0039d316-1c4b-4281-b951-d872f2087c98
* Add tooltip support to Windows tables.pkasting@chromium.org2010-05-102-9/+89
| | | | | | | | | | This doesn't actually make use of the functionality yet, but we get a nice benefit for free: by turning this on, we automatically get "labeltips" (see comments in the code) for all elided items in tables. BUG=43259 TEST=Hover any elided item in a table and it should display a tooltip with the full item text atop it. Review URL: http://codereview.chromium.org/2012006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46832 0039d316-1c4b-4281-b951-d872f2087c98