From e8ffe26c0621e5eaa94bab5d24651e9abd4ea178 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 15 Feb 2021 20:16:44 +0000 Subject: tdf#140387 grab focus to first panel widget on panel gaining focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise focus is getting lost in these currently mixed vcl+gtk widget panels. Change-Id: I6488ddfc98afdedb55bb3217f3877e96258dd65a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110955 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/uibase/sidebar/StylePresetsPanel.cxx | 2 ++ sw/source/uibase/sidebar/TableEditPanel.cxx | 2 ++ sw/source/uibase/sidebar/ThemePanel.cxx | 2 ++ sw/source/uibase/sidebar/WrapPropertyPanel.cxx | 2 ++ 4 files changed, 8 insertions(+) (limited to 'sw/source/uibase/sidebar') diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx index ecb2e61bd3f6..417b0792de37 100644 --- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx +++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx @@ -152,6 +152,8 @@ StylePresetsPanel::StylePresetsPanel(vcl::Window* pParent, mxValueSet->SetDoubleClickHdl(LINK(this, StylePresetsPanel, DoubleClickHdl)); RefreshList(); + + m_pInitialFocusWidget = mxValueSet->GetDrawingArea(); } void StylePresetsPanel::RefreshList() diff --git a/sw/source/uibase/sidebar/TableEditPanel.cxx b/sw/source/uibase/sidebar/TableEditPanel.cxx index 3fef04c92e30..d1840f8e95e7 100644 --- a/sw/source/uibase/sidebar/TableEditPanel.cxx +++ b/sw/source/uibase/sidebar/TableEditPanel.cxx @@ -137,6 +137,8 @@ TableEditPanel::TableEditPanel(vcl::Window* pParent, if (comphelper::LibreOfficeKit::isActive()) m_xMisc->set_item_visible(".uno:InsertFormula", false); + + m_pInitialFocusWidget = &m_xRowHeightEdit->get_widget(); } TableEditPanel::~TableEditPanel() { disposeOnce(); } diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 2ba276cf212e..25eac48e1174 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -447,6 +447,8 @@ ThemePanel::ThemePanel(vcl::Window* pParent, if (!aColorSets.empty()) mxValueSetColors->SelectItem(1); // ItemId 1, position 0 + + m_pInitialFocusWidget = mxListBoxFonts.get(); } ThemePanel::~ThemePanel() diff --git a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx index 567a5daaf699..985bd34ffcc3 100644 --- a/sw/source/uibase/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/uibase/sidebar/WrapPropertyPanel.cxx @@ -75,6 +75,8 @@ WrapPropertyPanel::WrapPropertyPanel( SpacingListBox::Fill(IsInch(eMetric) ? SpacingType::SPACING_INCH : SpacingType::SPACING_CM, *mxSpacingLB); Initialize(); + + m_pInitialFocusWidget = mxWrapOptions.get(); } WrapPropertyPanel::~WrapPropertyPanel() -- cgit v1.2.3