[Libreoffice-commits] core.git: include/svx svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 16 14:21:01 UTC 2020
include/svx/sidebar/AreaTransparencyGradientPopup.hxx | 6 ++++--
svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx | 8 +++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit d5ba43a2c0b49584e2128261f90d4ca0fec1878e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 16 11:53:48 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 16 15:20:25 2020 +0100
focus something inside the gradient popup
Change-Id: I81f859a4e1fbb3c0a305683193556397167b70cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86917
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
index 67abcbf6a5cc..d10c6445705b 100644
--- a/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
+++ b/include/svx/sidebar/AreaTransparencyGradientPopup.hxx
@@ -33,7 +33,7 @@ class AreaTransparencyGradientPopup final
private:
AreaPropertyPanelBase& mrAreaPropertyPanel;
std::unique_ptr<weld::Builder> mxBuilder;
- std::unique_ptr<weld::Widget> mxTopLevel;
+ std::unique_ptr<weld::Container> mxTopLevel;
std::unique_ptr<weld::Widget> mxCenterGrid;
std::unique_ptr<weld::Widget> mxAngleGrid;
std::unique_ptr<weld::MetricSpinButton> mxMtrTrgrCenterX;
@@ -50,11 +50,13 @@ private:
DECL_LINK(ModifiedTrgrHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(Left_Click45_Impl, const OString&, void);
DECL_LINK(Right_Click45_Impl, const OString&, void);
+ DECL_LINK(FocusHdl, weld::Widget&, void);
+
public:
AreaTransparencyGradientPopup(AreaPropertyPanelBase& rPanel, weld::Widget* pParent);
~AreaTransparencyGradientPopup();
- weld::Widget* getTopLevel() const { return mxTopLevel.get(); }
+ weld::Container* getTopLevel() const { return mxTopLevel.get(); }
void Rearrange(XFillFloatTransparenceItem const * pItem);
};
diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
index ff0d5b1fc693..fcab1a5ed27e 100644
--- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
+++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx
@@ -28,7 +28,7 @@ namespace svx::sidebar {
AreaTransparencyGradientPopup::AreaTransparencyGradientPopup(AreaPropertyPanelBase& rPanel, weld::Widget* pParent)
: mrAreaPropertyPanel(rPanel)
, mxBuilder(Application::CreateBuilder(pParent, "svx/ui/floatingareastyle.ui"))
- , mxTopLevel(mxBuilder->weld_widget("FloatingAreaStyle"))
+ , mxTopLevel(mxBuilder->weld_container("FloatingAreaStyle"))
, mxCenterGrid(mxBuilder->weld_widget("centergrid"))
, mxAngleGrid(mxBuilder->weld_widget("anglegrid"))
, mxMtrTrgrCenterX(mxBuilder->weld_metric_spin_button("centerx", FieldUnit::PERCENT))
@@ -49,6 +49,7 @@ AreaTransparencyGradientPopup::AreaTransparencyGradientPopup(AreaPropertyPanelBa
mxMtrTrgrEndValue->connect_value_changed(aLink);
mxBtnLeft45->connect_clicked(LINK(this, AreaTransparencyGradientPopup, Left_Click45_Impl));
mxBtnRight45->connect_clicked(LINK(this, AreaTransparencyGradientPopup, Right_Click45_Impl));
+ mxTopLevel->connect_focus_in(LINK(this, AreaTransparencyGradientPopup, FocusHdl));
}
AreaTransparencyGradientPopup::~AreaTransparencyGradientPopup()
@@ -170,6 +171,11 @@ IMPL_LINK_NOARG(AreaTransparencyGradientPopup, Right_Click45_Impl, const OString
ExecuteValueModify(nStartCol, nEndCol);
}
+IMPL_LINK_NOARG(AreaTransparencyGradientPopup, FocusHdl, weld::Widget&, void)
+{
+ mxMtrTrgrCenterX->grab_focus();
+}
+
} // end of namespace svx::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list