summaryrefslogtreecommitdiffstats
path: root/ui/views/examples/widget_example.cc
Commit message (Collapse)AuthorAgeFilesLines
* views: Migrate dialog buttons to LabelButtontfarina@chromium.org2013-02-281-3/+5
| | | | | | | | | | | | | | | | Some other changes: - Remove chrome_style.* and just use STYLE_NATIVE_TEXTBUTTON - Centralize the label of button when style is set to STYLE_NATIVE_TEXTBUTTON Note: No appearance or behavior chances are expected (except for experimental --enable-new-dialog-style). BUG=155363 R=msw@chromium.org Review URL: https://chromiumcodereview.appspot.com/12340094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185369 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DialogClientView layout, buttons, accelerators; etc.msw@chromium.org2013-02-191-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename Get[Extra|Footnote]View to Create*; only call once per dialog. Clamp 'extra view' size and align left in the button row. Simplify 'extra view' users: remove containers/layout, init on demand. Remove unused GetSizeExtraViewHeightToButtons / IsDialogButtonVisible / GetFootnoteViewHeight. Remove non-functional PaintSizeBox code and broken |size_box_bounds_|. Move meaningful StyleParams distinctions to GetInsets(). (temporarily regresses new dialog style resizing and button spacing) Get default button text in DialogDelegateView::GetDialogButtonLabel. Return superclass GetDialogButtonLabel in OVERRIDES, not string16(). Simplify FocusChangeListener add/remove for default button wrangling. Add TreeView return key accelerator handling to commit pending edits. Remove AreAcceleratorsEnabled (was for committing tree view, edits) Fix [Dialog|Widget]Example's init; add extra/footnote views. TODO(followup): Restore dialog resizing via frame view hit testing. TODO(followup): Fix new dialog button spacing via layout constants. BUG=166075 TEST=No observable dialog appearance/behavior changes (except minor button spacing change for experimental --enable-new-dialog-style) R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/12259021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183286 0039d316-1c4b-4281-b951-d872f2087c98
* Implement rough new dialog style.msw@google.com2013-01-071-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add/update and use NativeTheme dialog colors for Win/Aura. Use Label[Button] and Bubble[Border|Background] in DialogFrameView. Add DialogFrameView::content_margins_ similar to BubbleFrameView. Increase widget example size, add DialogExample with title. Tweak dialog example InitParams (nix frame, make transparent). Make the buttons in the widget example focusable. Make LabelButton::GetPreferredSize public. Refactor BubbleFrameView::GetBoundsForClientView. Roughly matches the specification at: https://docs.google.com/a/google.com/file/d/0B6x6iYCtKinEVjFvOWNfRlJCLU0/edit See the screenshot on the bug at: https://code.google.com/p/chromium/issues/detail?id=166075#c5 TODO(followup): Investigate a minor LabelButton drag/hot issue. TODO(followup): Add/use new close (x) button resources. TODO(followup): Generalize BubbleBorder to a custom frame border? BUG=166075 TEST=[Views examples] dialogs look closer to mocks with --enable-new-dialog-style (actual Chrome dialogs need more work). R=sky@chromium.org Review URL: https://codereview.chromium.org/11756005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175411 0039d316-1c4b-4281-b951-d872f2087c98
* Move ash/wm's DialogFrameView to ui/views/window; etc.msw@chromium.org2012-12-191-112/+27
| | | | | | | | | | | | | | | | | | | | | Move ash/wm/dialog_frame_view.[h|cc] to ui/views/window/. Move DialogFrameView to views namespace; export; cleanup. Expose static DialogDelegate::UseNewStyle() for commandline flag. OVERRIDE DialogDelegate::CreateNonClientFrameView to use DialogFrameView with flag. OVERRIDE DialogDelegateView::GetContentsView to return |this|. (nix redundant GetContentsView() OVERRIDEs from subclasses) Cleanup DialogClientView ctor; encapsulate StyleParams struct. Rewrite WidgetExample; nix transparency, add dialog widget, consolidate. BUG=166075 TEST=views_examples WidgetExample changes with --enabled-new-dialog-style R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11571023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173993 0039d316-1c4b-4281-b951-d872f2087c98
* views cleanup: Merge parent and parent_widget.erg@chromium.org2012-12-061-2/+2
| | | | | | | | | | | | According to Ben, parent_widget is a leftover from when we had NativeViewGtk. It isn't needed now and everything should be handleable by the normal parent. BUG=161882 Review URL: https://chromiumcodereview.appspot.com/11299317 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171590 0039d316-1c4b-4281-b951-d872f2087c98
* Replace views::Event with ui::Event.beng@google.com2012-08-101-1/+1
| | | | | | | | | http://crbug.com/125937 TBR=sky@chromium.org,jochen@chromium.org,sadrul@chromium.org Review URL: https://chromiumcodereview.appspot.com/10827271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151105 0039d316-1c4b-4281-b951-d872f2087c98
* Rename bounds accessors to be intuitive and consistentoshima@chromium.org2012-07-191-2/+2
| | | | | | | | | | | | | | | | | | GetClientAreaScreenBounds -> GetClientAreaBoundsInScreen Get/Set ParentBounds -> Get/Set BoundsInParent GetWorkAreaScreenBounds -> GetWorkAreaBoundsInScreen GetClientAreaScreenBounds -> GetClientAreaBoundsInScreen GetWindowScreenBounds -> GetWindowBoundsInScreen GetScreenBounds -> GetBoundsInScreen GetRootWindowBounds -> GetBoundsInRootWindow BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10795013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147499 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move view.h to ui/views/.tfarina@chromium.org2011-11-301-1/+1
| | | | | | | | | | BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8742030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112333 0039d316-1c4b-4281-b951-d872f2087c98
* jGet the examples to run in aura_shell.ben@chromium.org2011-11-291-31/+30
| | | | | | | | | | | | | | . Reorganizes views_examples target into two: views_examples_lib (a component) and views_examples_exe (a runner in views, which builds in Aura but does not run without crashing due to lack of desktop environment). . Refactors ExamplesMain into ExamplesWindowContents, a contents view that hosts the examples UI. Makes a publicly exported function from views examples to show a window containing this view. . Moves the examples into the views namespace. . Adds a button to launch the ExamplesWindow inside aura_shell. . Adds a NativeTabbedPaneViews to host the examples content. This is not a production class and is mostly just intended to get something onto the screen. The code is copy-pasta from NativeTabbedPaneWin. I imagine we can get rid of all of this once we stop using TabbedPanes in Chrome. http://crbug.com/105622 TEST=none Review URL: http://codereview.chromium.org/8687013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111954 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move button directory to ui/views/controls/.tfarina@chromium.org2011-11-281-1/+1
| | | | | | | | | | BUG=104039 R=maruel@chromium.org TBR=ben@chromium.org Review URL: http://codereview.chromium.org/8716001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111669 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-221-1/+1
| | | | | | | | | | | BUG=104039 R=ben@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=110949 Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111077 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 110949 - views: Move widget/ directory to ui/views.wez@chromium.org2011-11-211-1/+1
| | | | | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 TBR=tfarina@chromium.org Review URL: http://codereview.chromium.org/8547015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110953 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move widget/ directory to ui/views.tfarina@chromium.org2011-11-211-1/+1
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8598031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110949 0039d316-1c4b-4281-b951-d872f2087c98
* views: Delete bubble, events, focus, layout directories and its stubbed files.tfarina@chromium.org2011-11-181-2/+2
| | | | | | | | | BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8566052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110787 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move examples/ directory to ui/views/.tfarina@chromium.org2011-11-151-0/+169
BUG=104039 R=ben@chromium.org Review URL: http://codereview.chromium.org/8555013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110023 0039d316-1c4b-4281-b951-d872f2087c98