summaryrefslogtreecommitdiffstats
path: root/ui/views/painter.cc
Commit message (Collapse)AuthorAgeFilesLines
* Changes look for scrollbars on windows (2)sky@chromium.org2014-01-221-90/+8
| | | | | | | | | | | | | Additionally respects the size from the OS. BUG=333499 332937 TEST=none R=jam@chromium.org, sadrul@chromium.org TBR=sadrul@chromium.org Review URL: https://codereview.chromium.org/143953007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246401 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Changes look for scrollbars on windows ↵jochen@chromium.org2014-01-201-8/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/137533012/) Reason for revert: Broke webkit_unit_tests:ScrollingCoordinatorChromiumTest.rtlIframe Original issue's description: > Changes look for scrollbars on windows > > Additionally respects the size from the OS. > > BUG=333499 332937 > TEST=none > R=sadrul@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245886 TBR=sadrul@chromium.org,jam@chromium.org,cpu@chromium.org,sky@chromium.org NOTREECHECKS=true NOTRY=true BUG=333499 332937 Review URL: https://codereview.chromium.org/141123003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245938 0039d316-1c4b-4281-b951-d872f2087c98
* Changes look for scrollbars on windowssky@chromium.org2014-01-201-90/+8
| | | | | | | | | | | | Additionally respects the size from the OS. BUG=333499 332937 TEST=none R=sadrul@chromium.org Review URL: https://codereview.chromium.org/137533012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245886 0039d316-1c4b-4281-b951-d872f2087c98
* Removes FocusBorder from viewssky@chromium.org2013-12-051-2/+97
| | | | | | | | | | | | | | | | | | | | | | | This patch removes FocusBorder from View along with View::OnPaintFocusBorder. Views that want to render focus and that need to allow overriding get a Painter that is responsible for rendering the focus. Views that render focus differently must override OnFocus/OnBlur to SchedulePaint the necessary region. This patch simplifies View and cleans things up for views that don't ever want to paint focus, or paint focus differently (say TableView, or Textfield). On the down side it does mean any view that is focusable needs to override a few more additional methods. It was easy to get this wrong previously though as a common pattern is to override OnPaint and not invoke View::OnPaint. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/105013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238888 0039d316-1c4b-4281-b951-d872f2087c98
* Add GetMinimumSize() to Painter. This makes it easier for users of any Painterpkasting@chromium.org2013-05-171-6/+19
| | | | | | | | | | | | | (not just HorizontalPainter) to tell how tall/wide/etc. the background images are. BUG=231005 TEST=none R=sky@chromium.org Review URL: https://codereview.chromium.org/14710016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200849 0039d316-1c4b-4281-b951-d872f2087c98
* Make ImagePainter support image grids where not all the sizes match up. Thispkasting@chromium.org2013-05-161-74/+133
| | | | | | | | | | | | | | | will be useful with the upcoming omnibox size change. Also de-inline various functions and some misc. other cleanup, e.g. adding DISALLOW_COPY_AND_ASSIGN or fixing spelling errors. BUG=231005 TEST=none R=sky@chromium.org Review URL: https://codereview.chromium.org/14688021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200609 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite BubbleBorder with an ImagePainter.msw@chromium.org2013-04-251-7/+9
| | | | | | | | | | | | | | | | | | | Normalize bubble border asset sizes for use with ImagePainter. Normalize bubble arrow asset sizes for simplicity of calculations. Sanitize all the touched images with -o2. Rewrite and cleanup BubbleBorder code using ImagePainter. (no appearance/behavior changes; more maintainable+clear code) Fix corner radii, side-arrow OBO painting error, and min size calculations. Make ImagePainter capable of handling a null center image. BUG=161374 TEST=Bubbles and UI that uses bubble borders looks good. R=oshima@chromium.org,sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/12647016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196391 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 195969 "Revert 195908 "Stretch ImagePainter edge images i..."kalman@chromium.org2013-04-241-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | > Revert 195908 "Stretch ImagePainter edge images instead of tiling." > > Probably causing content_browsertest failures: > http://build.chromium.org/p/chromium.win/builders/Win%20Aura%20Tests%20%281%29/builds/3398 > > > Stretch ImagePainter edge images instead of tiling. > > > > BUG=218968,161374 > > TEST=Infobar buttons look correct (no broken gradient); no button appearance regressions. > > R=sky@chromium.org > > > > Review URL: https://chromiumcodereview.appspot.com/13986008 > > TBR=msw@chromium.org > > Review URL: https://codereview.chromium.org/13825011 TBR=kalman@chromium.org Review URL: https://codereview.chromium.org/14104003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196022 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 195908 "Stretch ImagePainter edge images instead of tiling."kalman@chromium.org2013-04-241-10/+7
| | | | | | | | | | | | | | | | | | | Probably causing content_browsertest failures: http://build.chromium.org/p/chromium.win/builders/Win%20Aura%20Tests%20%281%29/builds/3398 > Stretch ImagePainter edge images instead of tiling. > > BUG=218968,161374 > TEST=Infobar buttons look correct (no broken gradient); no button appearance regressions. > R=sky@chromium.org > > Review URL: https://chromiumcodereview.appspot.com/13986008 TBR=msw@chromium.org Review URL: https://codereview.chromium.org/13825011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195969 0039d316-1c4b-4281-b951-d872f2087c98
* Stretch ImagePainter edge images instead of tiling.msw@chromium.org2013-04-231-7/+10
| | | | | | | | | | BUG=218968,161374 TEST=Infobar buttons look correct (no broken gradient); no button appearance regressions. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/13986008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195908 0039d316-1c4b-4281-b951-d872f2087c98
* views: Convert scoped_arrays to the new scoped_ptr style.tfarina@chromium.org2013-01-091-2/+2
| | | | | | | | | | BUG=109874 R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11639042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175790 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate ImagePainter and BorderImages.msw@chromium.org2012-12-081-85/+86
| | | | | | | | | | | | | | | | | | | | | | | Remove button-specific BorderImage class and files. Rewrite ImagePainter using BorderImage-inspired code. (supports splitting one image or using 9 originals) Add CreateImageGridPainter static painter function. Store Painters in text/label button border classes. Rename BORDER_IMAGES macro to IMAGE_GRID; include braces. Convert existing BorderImage users to ImagePainter. Nix unused TextButtonDefaultBorder::copy_normal_set_to_hot_set(). Nix unused |paint_center| argument (true in only use). BUG=161374 TEST=No button or omnibox border painting regressions. R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11466019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171966 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Use skia::RefPtr<T> for implicit safe reference counting.danakj@chromium.org2012-12-051-4/+3
| | | | | | | | | | | R=sky BUG=163454 Depends on: https://codereview.chromium.org/11418217/ NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11299262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171107 0039d316-1c4b-4281-b951-d872f2087c98
* Add Vector2d classes that represent offsets, instead of using Point.danakj@chromium.org2012-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously Point served two purposes, to be a position in 2d space, and also an offset from the origin. This introduces a Vector2d class to represent an offset, allowing typesafety checks for geometric operations. The following are now the case: Point +/- Vector = Point - A point plus/minus an offset gives you a point at a position offset by the vector. Vector +/- Vector = Vector - Two offsets can be added together to make a new offset. Point - Point = Vector - Subtracting one point from another gives you the offset between the two points. We add some new methods to perform these operations: Rect::OffsetFromOrigin() gives the offset between the position of the rect and the origin. Point::OffsetFromOrigin() gives the offset between the point and the origin. PointAtOffsetFromOrigin(Vector2d) converts a Vector2d to a Point at the given offset away from the origin. Rect::Offset(), Point::Add(), and Point::Subtract() now receive a Vector2d instead of a point. BUG=147395 R=sky Review URL: https://codereview.chromium.org/11269022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165198 0039d316-1c4b-4281-b951-d872f2087c98
* views: Delete some array pointers in GradientPainter using scoped_array.tfarina@chromium.org2012-09-191-10/+8
| | | | | | | | R=sky@chromium.org Review URL: https://codereview.chromium.org/10953002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157547 0039d316-1c4b-4281-b951-d872f2087c98
* (Views only) Add a gradient background to the tabstrip of the view tabbed ↵markusheintz@chromium.org2012-08-101-8/+40
| | | | | | | | | | | | pane implementation. BUG=138063 TEST=none Review URL: https://chromiumcodereview.appspot.com/10823229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151017 0039d316-1c4b-4281-b951-d872f2087c98
* Rename DrawBitmapInt to DrawImageIntpkotwicz@chromium.org2012-06-071-14/+14
| | | | | | | | | | | Bug=None Test=Compiles Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=140877 Review URL: https://chromiumcodereview.appspot.com/10512021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141002 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 140877 - Rename DrawBitmapInt to DrawImageIntpkotwicz@chromium.org2012-06-061-14/+14
| | | | | | | | | | | | Bug=None Test=Compiles Review URL: https://chromiumcodereview.appspot.com/10512021 TBR=pkotwicz@chromium.org Review URL: https://chromiumcodereview.appspot.com/10546037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140882 0039d316-1c4b-4281-b951-d872f2087c98
* Rename DrawBitmapInt to DrawImageIntpkotwicz@chromium.org2012-06-061-14/+14
| | | | | | | | | Bug=None Test=Compiles Review URL: https://chromiumcodereview.appspot.com/10512021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140877 0039d316-1c4b-4281-b951-d872f2087c98
* Converts remainder of ui (except for ui/app_list) and ↵pkotwicz@chromium.org2012-05-311-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chrome/browser/ui/views/frame to use ImageSkia Do conversion using the same sed script as for 10437006 Modified by hand afterwards: 1 chrome/browser/download/download_util.cc 2 chrome/browser/ui/panels/panel_browser_frame_view.cc 3 chrome/browser/ui/panels/panel_browser_frame_view.h 4 chrome/browser/ui/toolbar/wrench_menu_model.cc 5 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc 6 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h 7 chrome/browser/ui/views/constrained_window_views.cc 8 chrome/browser/ui/views/frame/glass_browser_frame_view.cc 9 chrome/browser/ui/views/tab_icon_view.h 10 ui/base/dragdrop/drag_utils.h 11 ui/base/dragdrop/drag_utils_gtk.cc 12 ui/base/dragdrop/drag_utils_win.cc 13 ui/base/native_theme/native_theme_android.cc 14 ui/base/native_theme/native_theme_android.h 15 ui/base/native_theme/native_theme_base.cc 16 ui/base/native_theme/native_theme_base.h 17 ui/views/widget/native_widget_private.h 18 ui/views/window/frame_background.h 19 ui/views/window/window_resources.h Line wrapping and include fixes chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc 1 chrome/browser/ui/views/frame/browser_view.cc 2 chrome/browser/ui/views/frame/opaque_browser_frame_view.cc 3 ui/base/dragdrop/drag_utils_aura.cc 4 ui/base/dragdrop/os_exchange_data_provider_aura.h 5 ui/base/native_theme/native_theme_aura.cc 6 ui/views/button_drag_utils.h 7 ui/views/painter.cc 8 ui/views/painter.h 9 ui/views/widget/native_widget_aura.cc 10 ui/views/widget/widget_delegate.h 11 ui/views/window/custom_frame_view.cc 12 ui/views/window/custom_frame_view.h Test=Compiles, Webkit layout tests fast/ pass Bug=124566 Review URL: https://chromiumcodereview.appspot.com/10447053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139734 0039d316-1c4b-4281-b951-d872f2087c98
* views: Do not pass SkColor by const-reference as it's defined as POD(integer).tfarina@chromium.org2012-04-171-1/+1
| | | | | | | | | | This is a follow up to r128782. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/10091049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132630 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Update includes to point to canvas.h instead of canvas_skia.htfarina@chromium.org2012-03-141-1/+0
| | | | | | | | | | BUG=116572 R=asvitkine@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9702009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126639 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Get rid of CanvasSkia::GetSkCanvas() function.tfarina@chromium.org2012-03-131-3/+3
| | | | | | | | | | BUG=116572 R=asvitkine@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9663077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126495 0039d316-1c4b-4281-b951-d872f2087c98
* views: Do not use deprecated ResourceBundle::GetBitmapNamed() function.tfarina@chromium.org2012-03-061-2/+3
| | | | | | | | | | | | Instead use the recommended ResourceBundle::GetImageNamed() function and convert it to the native type appropriately. BUG=58030 R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9597022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125201 0039d316-1c4b-4281-b951-d872f2087c98
* ui: Let skia do the conversion work for us by using the integer version of ↵tfarina@chromium.org2012-03-011-6/+5
| | | | | | | | | | | set() function. R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9544001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124416 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change Painter::Paint to take a gfx::Size instead of ints.tfarina@chromium.org2012-02-151-27/+32
| | | | | | | | | BUG=100898 R=pkasting@chromium.org,sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9359053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122100 0039d316-1c4b-4281-b951-d872f2087c98
* views: Change Painter::PaintPainterAt to take a gfx::Rect instead of ints.tfarina@chromium.org2012-02-141-7/+7
| | | | | | | | | BUG=100898 R=pkasting@chromium.org,sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9361072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121974 0039d316-1c4b-4281-b951-d872f2087c98
* Speculative Revert 120885 - ui/gfx: Make the first version of ↵hbono@chromium.org2012-02-081-4/+6
| | | | | | | | | | | | | | | Canvas::TileImageInt take a gfx::Rect. BUG=100898 R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9332006 TBR=tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/9358015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120943 0039d316-1c4b-4281-b951-d872f2087c98
* ui/gfx: Make the first version of Canvas::TileImageInt take a gfx::Rect.tfarina@chromium.org2012-02-081-6/+4
| | | | | | | | | | BUG=100898 R=pkasting@chromium.org TBR=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/9332006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120885 0039d316-1c4b-4281-b951-d872f2087c98
* views: Move the remaining file from views/ to ui/views/.tfarina@chromium.org2011-12-011-0/+199
BUG=104039 R=ben@chromium.org TBR=stevenjb@chromium.org Review URL: http://codereview.chromium.org/8771006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112469 0039d316-1c4b-4281-b951-d872f2087c98