[Libreoffice-commits] .: cui/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Mar 11 12:38:04 PST 2011
cui/source/options/optchart.cxx | 7 +++++--
cui/source/tabpages/backgrnd.cxx | 8 ++++----
cui/source/tabpages/tpcolor.cxx | 5 ++++-
3 files changed, 13 insertions(+), 7 deletions(-)
New commits:
commit 3f07aacf639deafae58d65c4be8ca47e3c9329fb
Author: Xavier ALT <dex at phoenix-ind.net>
Date: Sun Mar 6 10:02:54 2011 +0100
fdo#34896 color palette size (8x13), only show scrollbar when needed
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 4046db1..eddf334 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 9aabee4..44a93a7 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 984e97f..603849b 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 );
More information about the Libreoffice-commits
mailing list