include/svx/SvxColorValueSet.hxx | 2 ++ svx/source/tbxctrls/SvxColorValueSet.cxx | 9 +++++++++ 2 files changed, 11 insertions(+)
New commits: commit b425c2964b0f35fe12383b47c41816d612b6981b Author: Caolán McNamara <caol...@redhat.com> Date: Fri May 31 15:22:42 2013 +0100 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 diff --git a/include/svx/SvxColorValueSet.hxx b/include/svx/SvxColorValueSet.hxx index 819de02..f4b2ba3 100644 --- a/include/svx/SvxColorValueSet.hxx +++ b/include/svx/SvxColorValueSet.hxx @@ -35,6 +35,8 @@ public: SvxColorValueSet(Window* pParent, WinBits nWinStyle = WB_ITEMBORDER); SvxColorValueSet(Window* pParent, const ResId& rResId); + virtual void Resize(); + sal_uInt32 getMaxRowCount() const; sal_uInt32 getEntryEdgeLength() const; sal_uInt32 getColumnCount() const; diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx index d990fab..9c558c2 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)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits