[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - include/svx svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 6 14:12:06 UTC 2018


 include/svx/colorwindow.hxx      |    1 +
 svx/source/tbxctrls/tbcontrl.cxx |    6 ++++++
 2 files changed, 7 insertions(+)

New commits:
commit b75019c5f457fd7865f8327d72ef6c179bbacf46
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 4 15:18:32 2018 +0100
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Thu Sep 6 16:11:44 2018 +0200

    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 at collabora.co.uk>

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();


More information about the Libreoffice-commits mailing list