summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-05-31 15:22:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-05-31 16:13:17 +0100
commit98a3c7228c6e6ed4da284eb4258cd787999a71b4 (patch)
treec9b9de5477b11b8e92d026582c9003f5ae1e44e6 /svx
parent3e0fa22de3b761686fb5b5bf4e44a91172c45f3b (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 (cherry picked from commit b425c2964b0f35fe12383b47c41816d612b6981b)
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/SvxColorValueSet.cxx9
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)