Kaydet (Commit) b425c296 authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 8196dab4
...@@ -35,6 +35,8 @@ public: ...@@ -35,6 +35,8 @@ public:
SvxColorValueSet(Window* pParent, WinBits nWinStyle = WB_ITEMBORDER); SvxColorValueSet(Window* pParent, WinBits nWinStyle = WB_ITEMBORDER);
SvxColorValueSet(Window* pParent, const ResId& rResId); SvxColorValueSet(Window* pParent, const ResId& rResId);
virtual void Resize();
sal_uInt32 getMaxRowCount() const; sal_uInt32 getMaxRowCount() const;
sal_uInt32 getEntryEdgeLength() const; sal_uInt32 getEntryEdgeLength() const;
sal_uInt32 getColumnCount() const; sal_uInt32 getColumnCount() const;
......
...@@ -118,6 +118,15 @@ Size SvxColorValueSet::layoutAllVisible(sal_uInt32 nEntryCount) ...@@ -118,6 +118,15 @@ Size SvxColorValueSet::layoutAllVisible(sal_uInt32 nEntryCount)
return CalcWindowSizePixel(aItemSize); 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) Size SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntryCount)
{ {
if(!nEntryCount) if(!nEntryCount)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment