summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/settings.hxx2
-rw-r--r--svx/source/tbxctrls/SvxColorValueSet.cxx7
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx15
-rw-r--r--svx/uiconfig/ui/colorwindow.ui4
-rw-r--r--vcl/source/app/settings.cxx2
5 files changed, 13 insertions, 17 deletions
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index ef1835929fbd..8dcaa4ceacfc 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -590,7 +590,7 @@ public:
sal_uInt16 GetColorValueSetColumnCount() const;
// maximum row/line count for the ColorValueSet control. If more lines would be needed, a scrollbar will
- // be used. Default is 40.
+ // be used.
sal_uInt16 GetColorValueSetMaximumRowCount() const;
const Size& GetListBoxPreviewDefaultPixelSize() const;
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx
index 65955445e602..bef5006d07d6 100644
--- a/svx/source/tbxctrls/SvxColorValueSet.cxx
+++ b/svx/source/tbxctrls/SvxColorValueSet.cxx
@@ -122,10 +122,7 @@ Size SvxColorValueSet::layoutAllVisible(sal_uInt32 nEntryCount)
void SvxColorValueSet::Resize()
{
- vcl::Window *pParent = GetParent();
- //don't do this for the drop down color palettes
- if (pParent && pParent->GetType() != WindowType::FLOATINGWINDOW)
- layoutToGivenHeight(GetOutputSizePixel().Height(), GetItemCount());
+ layoutToGivenHeight(GetSizePixel().Height(), GetItemCount());
ValueSet::Resize();
}
@@ -136,7 +133,7 @@ Size SvxColorValueSet::layoutToGivenHeight(sal_uInt32 nHeight, sal_uInt32 nEntry
nEntryCount++;
}
- const Size aItemSize(getEntryEdgeLength(), getEntryEdgeLength());
+ const Size aItemSize(getEntryEdgeLength() - 2, getEntryEdgeLength() - 2);
const WinBits aWinBits(GetStyle() & ~WB_VSCROLL);
// get size with all fields disabled
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index aeab85cdb3c8..2a9afe6474f3 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1324,10 +1324,9 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand,
}
OUString aPaletteName( officecfg::Office::Common::UserColors::PaletteName::get() );
mpPaletteListBox->SelectEntry( aPaletteName );
- if (mpPaletteListBox->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND)
- {
- SelectPaletteHdl( *mpPaletteListBox );
- }
+ const sal_Int32 nSelectedEntry(mpPaletteListBox->GetSelectEntryPos());
+ if (nSelectedEntry != LISTBOX_ENTRY_NOTFOUND)
+ mrPaletteManager.SetPalette(nSelectedEntry);
mpButtonAutoColor->SetClickHdl( LINK( this, SvxColorWindow, AutoColorClickHdl ) );
mpButtonNoneColor->SetClickHdl( LINK( this, SvxColorWindow, AutoColorClickHdl ) );
@@ -1339,11 +1338,13 @@ SvxColorWindow::SvxColorWindow(const OUString& rCommand,
mpColorSet->SetHelpId( HID_POPUP_COLOR_CTRL );
mrPaletteManager.ReloadColorSet(*mpColorSet);
- mpColorSet->layoutToGivenHeight(mpColorSet->GetSizePixel().Height(), mrPaletteManager.GetColorCount());
+ const sal_uInt32 nMaxItems(mpColorSet->getMaxRowCount() * mpColorSet->getColumnCount());
+ Size aSize = mpColorSet->layoutAllVisible(nMaxItems);
+ mpColorSet->set_height_request(aSize.Height());
+ mpColorSet->set_width_request(aSize.Width());
mrPaletteManager.ReloadRecentColorSet(*mpRecentColorSet);
- mpRecentColorSet->SetLineCount( 1 );
- Size aSize = mpRecentColorSet->layoutAllVisible(mrPaletteManager.GetRecentColorCount());
+ aSize = mpRecentColorSet->layoutAllVisible(mrPaletteManager.GetRecentColorCount());
mpRecentColorSet->set_height_request(aSize.Height());
mpRecentColorSet->set_width_request(aSize.Width());
diff --git a/svx/uiconfig/ui/colorwindow.ui b/svx/uiconfig/ui/colorwindow.ui
index 06d41994e78d..427fe869a539 100644
--- a/svx/uiconfig/ui/colorwindow.ui
+++ b/svx/uiconfig/ui/colorwindow.ui
@@ -103,14 +103,12 @@
</child>
<child>
<object class="svxcorelo-SvxColorValueSet" id="colorset">
- <property name="width_request">200</property>
- <property name="height_request">150</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index e500d50bfa8a..456aca3e109e 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -550,7 +550,7 @@ ImplStyleData::ImplStyleData() :
maEdgeBlendingBottomRightColor = RGB_COLORDATA(0x40, 0x40, 0x40);
mnListBoxMaximumLineCount = 25;
mnColorValueSetColumnCount = 12;
- mnColorValueSetMaximumRowCount = 20;
+ mnColorValueSetMaximumRowCount = 8;
maListBoxPreviewDefaultLogicSize = Size(15, 7);
maListBoxPreviewDefaultPixelSize = Size(0, 0); // on-demand calculated in GetListBoxPreviewDefaultPixelSize()
mnListBoxPreviewDefaultLineWidth = 1;