second patch.
--
Xavier ALT
From f053a65fe610f77926f5b07288f346b0b901500f Mon Sep 17 00:00:00 2001
From: Xavier ALT <dex@phoenix-ind.net>
Date: Sun, 6 Mar 2011 10:02:54 +0100
Subject: [PATCH] fdo#34896 color palette size (8x13), only show scrollbar when needed
---
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(-)
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 );
--
1.7.1
Context
- [Libreoffice] [PATCH] 2/2 fdo#34896 make color palette size consistent · Xavier ALT
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.