summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-10-28 21:09:16 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2014-10-28 22:46:09 +0200
commit7ff283c6b3dad49129cd0df9176275805d25d7b9 (patch)
tree4bb054109bcb3a33dcbb8fe23c64cfc473340d13 /svx
parent2c3c7529b5a0f66e01215ab4c3b309c8e5028000 (diff)
colorwindow: Use exactly one row of recent colors
Right now one row of SvxColorValueSet is 12 colors. Change-Id: I9be6e8487d5325866e17f578b7abb08f7c338fb1
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/PaletteManager.cxx4
-rw-r--r--svx/source/tbxctrls/colorwindow.hxx2
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
3 files changed, 4 insertions, 8 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx
index e07ad15260cc..b6d3cb7a3f8a 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -24,13 +24,15 @@
#include <svx/drawitem.hxx>
#include <svx/dialogs.hrc>
#include <svtools/colrdlg.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/settings.hxx>
#define STR_DEFAULT_PAL "Default palette"
#define STR_DOC_COLORS "Document colors"
#define STR_DOC_COLOR_PREFIX "Document Color "
PaletteManager::PaletteManager() :
- mnMaxRecentColors(10),
+ mnMaxRecentColors(Application::GetSettings().GetStyleSettings().GetColorValueSetColumnCount()),
mnNumOfPalettes(2),
mnCurrentPalette(0),
mnColorCount(0),
diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx
index f0ccdc508304..b7f56813304b 100644
--- a/svx/source/tbxctrls/colorwindow.hxx
+++ b/svx/source/tbxctrls/colorwindow.hxx
@@ -47,8 +47,6 @@ private:
PaletteManager& mrPaletteManager;
- const sal_uInt16 mnColorSetCols;
-
DECL_LINK( SelectHdl, SvxColorValueSet* );
DECL_LINK( SelectPaletteHdl, void *);
DECL_LINK( AutoColorClickHdl, void * );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index abcf9c945091..9ca375a54116 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1136,9 +1136,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
rFrame ),
theSlotId( nSlotId ),
maCommand( rCommand ),
- mrPaletteManager( rPaletteManager ),
- mnColorSetCols( 10 )
-
+ mrPaletteManager( rPaletteManager )
{
get(mpPaletteListBox, "palette_listbox");
get(mpButtonAutoColor, "auto_color_button");
@@ -1150,9 +1148,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand,
mpColorSet->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT) );
mpRecentColorSet->SetStyle( WinBits(WB_FLATVALUESET | WB_ITEMBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT) );
- mpColorSet->SetColCount( mnColorSetCols );
mpColorSet->layoutAllVisible(mrPaletteManager.GetColorCount());
- mpRecentColorSet->SetColCount( mnColorSetCols );
mpRecentColorSet->SetLineCount( 1 );
mpRecentColorSet->layoutAllVisible(mrPaletteManager.GetRecentColorCount());