diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-05-31 15:22:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-31 15:40:38 +0100 |
commit | b425c2964b0f35fe12383b47c41816d612b6981b (patch) | |
tree | 96aa9fd263bc201f5d6b668b038e9003b9c24a91 /svx/source/tbxctrls/SvxColorValueSet.cxx | |
parent | 8196dab4f450d96905f0bbfe650ae7a78c8972e2 (diff) |
make SvxColorValueSet not squish all colours into avail space
instead hook SvxColorValueSet::Resize() to layoutToGivenHeight
and let it add a scrollbar if the height would squish them
Change-Id: Ia94b01b247f734f3640b15f7161d28530e65d538
Diffstat (limited to 'svx/source/tbxctrls/SvxColorValueSet.cxx')
-rw-r--r-- | svx/source/tbxctrls/SvxColorValueSet.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index d990fab0d260..9c558c29f069 100644 --- a/svx/source/tbxctrls/SvxColorValueSet.cxx +++ b/svx/source/tbxctrls/SvxColorValueSet.cxx @@ -118,6 +118,15 @@ Size SvxColorValueSet::layoutAllVisible(sal_uInt32 nEntryCount) return CalcWindowSizePixel(aItemSize); } +void SvxColorValueSet::Resize() +{ + Window *pParent = GetParent(); + //don't do this for the drop down color palettes + if (pParent && pParent->GetType() != WINDOW_FLOATINGWINDOW) + layoutToGivenHeight(GetOutputSizePixel().Height(), GetItemCount()); + ValueSet::Resize(); +} + Size SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount) { if(!nEntryCount) |