summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorXavier ALT <dex@phoenix-ind.net>2011-03-06 10:02:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-03-11 20:28:07 +0000
commitb40a71e67e194735cb5ba928d7dc0042f0111717 (patch)
treeaeb3c165f59de5860cf829b39f582bc294718dd0 /cui
parentcef1ec87ed33935692dd56534d0b37ea5dfe398a (diff)
fdo#34896 color palette size (8x13), only show scrollbar when needed
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optchart.cxx7
-rw-r--r--cui/source/tabpages/backgrnd.cxx8
-rw-r--r--cui/source/tabpages/tpcolor.cxx5
3 files changed, 13 insertions, 7 deletions
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 85a76459e917..38ab38180418 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -69,9 +69,9 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage( Window* pParent, const SfxItemSe
aValSetColorBox.SetSelectHdl( LINK( this, SvxDefaultColorOptPage, BoxClickedHdl ) );
aValSetColorBox.SetStyle( aValSetColorBox.GetStyle()
- | WB_VSCROLL | WB_ITEMBORDER | WB_NAMEFIELD );
+ | WB_ITEMBORDER | WB_NAMEFIELD );
aValSetColorBox.SetColCount( 8 );
- aValSetColorBox.SetLineCount( 12 );
+ aValSetColorBox.SetLineCount( 13 );
aValSetColorBox.SetExtraSpacing( 0 );
aValSetColorBox.Show();
@@ -143,6 +143,9 @@ void SvxDefaultColorOptPage::FillColorBox()
long nCount = pColorTab->Count();
XColorEntry* pColorEntry;
+ if( nCount > 104 )
+ aValSetColorBox.SetStyle( aValSetColorBox.GetStyle() | WB_VSCROLL );
+
for( long i = 0; i < nCount; i++ )
{
pColorEntry = pColorTab->GetColor( i );
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 9225f1c4f679..1e0a256d6252 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1154,13 +1154,13 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
aBackgroundColorSet.InsertItem( i + 1, pEntry->GetColor(), pEntry->GetName() );
}
- while ( i < 80 )
+ while ( i < 104 )
{
aBackgroundColorSet.InsertItem( i + 1, aColWhite, aStrWhite );
i++;
}
- if ( nCount > 80 )
+ if ( nCount > 104 )
{
aBackgroundColorSet.SetStyle( nBits | WB_VSCROLL );
}
@@ -1169,8 +1169,8 @@ void SvxBackgroundTabPage::FillColorValueSets_Impl()
if ( bOwn )
delete pColorTable;
- aBackgroundColorSet.SetColCount( 10 );
- aBackgroundColorSet.SetLineCount( 10 );
+ aBackgroundColorSet.SetColCount( 8 );
+ aBackgroundColorSet.SetLineCount( 13 );
aBackgroundColorSet.CalcWindowSizePixel( aSize15x15 );
}
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 124417157409..4684ad4425ad 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -162,7 +162,7 @@ SvxColorTabPage::SvxColorTabPage
// ValueSet
aValSetColorTable.SetStyle( aValSetColorTable.GetStyle() | WB_VSCROLL | WB_ITEMBORDER );
aValSetColorTable.SetColCount( 8 );
- aValSetColorTable.SetLineCount( 10 );
+ aValSetColorTable.SetLineCount( 13 );
aValSetColorTable.SetExtraSpacing( 0 );
aValSetColorTable.Show();
@@ -1142,6 +1142,9 @@ void SvxColorTabPage::FillValueSet_Impl( ValueSet& rVs )
long nCount = pColorTab->Count();
XColorEntry* pColorEntry;
+ if( nCount > 104 )
+ rVs.SetStyle( rVs.GetStyle() | WB_VSCROLL );
+
for( long i = 0; i < nCount; i++ )
{
pColorEntry = pColorTab->GetColor( i );