Descriptionviews::ImageButton: Added SetMinimumImageSize; removed SetPreferredSize.
ImageButton::SetMinimumImageSize allows the client to explicitly set a
size larger than the image contained within the button. The image will
be aligned inside the button according to its alignment setting.
ImageButton::SetPreferredSize had a misleading name (since in fact it
only sets the size when there is no image) and is no longer needed. Its
original usage (r50040) is now gone. It wasn't having any effect in
either of its two remaining callers, since they always set an image
immediately afterwards. Therefore, deleted this method and removed both
calls to it. Note that we are keeping the default behaviour that an
ImageButton with no image has a size of 16x14. I wanted to remove this,
but the list of potential clients that could be relying on it is huge.
BUG=415909
Committed: https://crrev.com/306b915c2ea97c618aa011aa6a3f39c5d5b0600b
Cr-Commit-Position: refs/heads/master@{#295917}
Patch Set 1 #Patch Set 2 : Added tests for border + minimum size. #Patch Set 3 : Formatting. #Patch Set 4 : Delete usage of SetPreferredSize entirely -- these had no effect. #
Total comments: 6
Patch Set 5 : Respond to sky's comments. #
Messages
Total messages: 10 (2 generated)
|