diff options
Diffstat (limited to 'ash/wm/image_grid.cc')
-rw-r--r-- | ash/wm/image_grid.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ash/wm/image_grid.cc b/ash/wm/image_grid.cc index f8b87e9..c9c341f 100644 --- a/ash/wm/image_grid.cc +++ b/ash/wm/image_grid.cc @@ -203,6 +203,18 @@ void ImageGrid::SetSize(const gfx::Size& size) { } } +void ImageGrid::SetContentBounds(const gfx::Rect& content_bounds) { + SetSize( + gfx::Size( + content_bounds.width() + left_image_width_ + right_image_width_, + content_bounds.height() + top_image_height_ + bottom_image_height_)); + layer_->SetBounds( + gfx::Rect(content_bounds.x() - left_image_width_, + content_bounds.y() - top_image_height_, + layer_->bounds().width(), + layer_->bounds().height())); +} + void ImageGrid::ImagePainter::SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer) { if (clip_rect != clip_rect_) { |