default focus colorset on popover gaining focus
Change-Id: Icb731c4c9544d754bb3ad88ecf15ffc04f216294
Reviewed-on: https://gerrit.libreoffice.org/60006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 653214a9..ade14fb 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -136,6 +136,7 @@ private:
DECL_LINK(SelectPaletteHdl, weld::ComboBoxText&, void);
DECL_LINK(AutoColorClickHdl, weld::Button&, void);
DECL_LINK(OpenPickerClickHdl, weld::Button&, void);
DECL_LINK(FocusHdl, weld::Widget&, void);
static bool SelectValueSetEntry(ColorValueSet* pColorSet, const Color& rColor);
static NamedColor GetSelectEntryColor(SvtValueSet const * pColorSet);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 68282f4..a0bcc10 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1452,6 +1452,7 @@ ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager
mxColorSet->SetSelectHdl(LINK( this, ColorWindow, SelectHdl));
mxRecentColorSet->SetSelectHdl(LINK( this, ColorWindow, SelectHdl));
mxTopLevel->set_help_id(HID_POPUP_COLOR);
mxTopLevel->connect_focus_in(LINK(this, ColorWindow, FocusHdl));
mxColorSet->SetHelpId(HID_POPUP_COLOR_CTRL);
mxPaletteManager->ReloadColorSet(*mxColorSet);
@@ -1466,6 +1467,11 @@ ColorWindow::ColorWindow(std::shared_ptr<PaletteManager> const & rPaletteManager
AddStatusListener( ".uno:ColorTableState" );
}
IMPL_LINK_NOARG(ColorWindow, FocusHdl, weld::Widget&, void)
{
mxColorSet->GrabFocus();
}
void SvxColorWindow::ShowNoneButton()
{
mpButtonNoneColor->Show();