summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-04 15:18:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-09-05 09:54:07 +0200
commit1d4f03114f3fb04fc1b493193e3eddee07cdabb8 (patch)
tree83c59aee4a809e999c92958bce8c6364edc0a9a1
parent11d513d580ed8b80fd32987cb9c73716b48ca916 (diff)
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>
-rw-r--r--include/svx/colorwindow.hxx1
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 653214a9d3e4..ade14fbb1281 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 68282f45acd6..a0bcc10d34e9 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();