This source file includes following definitions.
- height_
- GetPreferredSize
#include "ash/system/tray/fixed_sized_image_view.h"
namespace ash {
FixedSizedImageView::FixedSizedImageView(int width, int height)
: width_(width),
height_(height) {
SetHorizontalAlignment(views::ImageView::CENTER);
SetVerticalAlignment(views::ImageView::CENTER);
}
FixedSizedImageView::~FixedSizedImageView() {
}
gfx::Size FixedSizedImageView::GetPreferredSize() {
gfx::Size size = views::ImageView::GetPreferredSize();
return gfx::Size(width_ ? width_ : size.width(),
height_ ? height_ : size.height());
}
}