summaryrefslogtreecommitdiffstats
path: root/ash/system
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 17:19:32 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-18 17:19:32 +0000
commit750c0c743e66267adc5b88a4a38c712c65831a4c (patch)
treeda4897fe1fe678883f0babcb27dbc16084af40ae /ash/system
parent14cf0f1e4ecfa9e16b7976895ebbd7fabb4edaae (diff)
downloadchromium_src-750c0c743e66267adc5b88a4a38c712c65831a4c.zip
chromium_src-750c0c743e66267adc5b88a4a38c712c65831a4c.tar.gz
chromium_src-750c0c743e66267adc5b88a4a38c712c65831a4c.tar.bz2
ash: Make sure the scroll-view takes the border size into account when computing the preferred size.
BUG=132880 TEST=manually Review URL: https://chromiumcodereview.appspot.com/10560035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142746 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r--ash/system/tray/tray_views.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc
index 871b1b1..1ef58060 100644
--- a/ash/system/tray/tray_views.cc
+++ b/ash/system/tray/tray_views.cc
@@ -263,8 +263,11 @@ void FixedSizedScrollView::SetFixedSize(gfx::Size size) {
}
gfx::Size FixedSizedScrollView::GetPreferredSize() {
- return fixed_size_.IsEmpty() ? GetContents()->GetPreferredSize() :
- fixed_size_;
+ gfx::Size size = fixed_size_.IsEmpty() ?
+ GetContents()->GetPreferredSize() : fixed_size_;
+ gfx::Insets insets = GetInsets();
+ size.Enlarge(insets.width(), insets.height());
+ return size;
}
void FixedSizedScrollView::Layout() {