summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-09-04 15:18:32 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-09-06 16:11:44 +0200
commitb75019c5f457fd7865f8327d72ef6c179bbacf46 (patch)
tree34057d1582b85b5fe778727123e9a644ddd38e01
parent0e98d9a75952116655fa90d83478c2be323fff64 (diff)
default focus colorset on popover gaining focus
Change-Id: Icb731c4c9544d754bb3ad88ecf15ffc04f216294 Reviewed-on: https://gerrit.libreoffice.org/60018 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-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 118c69217aa8..3b9575674eb9 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -138,6 +138,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 94a4860fbb72..d7c5031004da 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1451,6 +1451,7 @@ ColorWindow::ColorWindow(const OUString& rCommand,
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);
@@ -1471,6 +1472,11 @@ ColorWindow::ColorWindow(const OUString& rCommand,
}
}
+IMPL_LINK_NOARG(ColorWindow, FocusHdl, weld::Widget&, void)
+{
+ mxColorSet->GrabFocus();
+}
+
void SvxColorWindow::ShowNoneButton()
{
mpButtonNoneColor->Show();