diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-07-06 11:40:07 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-08-20 09:30:38 +0200 |
commit | e5a7a65e59fcd300834e5a7d20b797dedbeb6b69 (patch) | |
tree | 3c3964a78d2d5a235c45c31817612be947344a3f /svx/source/sidebar | |
parent | d001836139b28d367cc70b64a13519d173066df1 (diff) |
Convert AreaTransparencyGradientPopup to WeldToolbarPopup
Change-Id: I3cbb17de9953281e884f6c1b2984bc4865a56227
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118471
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120700
Tested-by: Jenkins
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx | 31 |
2 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index c04eb8cc8ebe..da8eba0a49e7 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -65,6 +65,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase( weld::Widget* pParent, const css::uno::Reference<css::frame::XFrame>& rxFrame) : PanelLayout(pParent, "AreaPropertyPanel", "svx/ui/sidebararea.ui"), + mxFrame(rxFrame), meLastXFS(static_cast<sal_uInt16>(-1)), mnLastPosHatch(0), mnLastPosBitmap(0), @@ -179,7 +180,7 @@ void AreaPropertyPanelBase::Initialize() mxMTRTransparent->connect_value_changed(LINK(this, AreaPropertyPanelBase, ModifyTransparentHdl_Impl)); mxSldTransparent->connect_value_changed(LINK(this, AreaPropertyPanelBase, ModifyTransSliderHdl)); - mxTrGrPopup = std::make_unique<AreaTransparencyGradientPopup>(*this, mxBTNGradient.get()); + mxTrGrPopup = std::make_unique<AreaTransparencyGradientPopup>(mxFrame, *this, mxBTNGradient.get()); mxBTNGradient->set_item_popover(SIDEBARGRADIENT, mxTrGrPopup->getTopLevel()); mxBTNGradient->connect_clicked(LINK(this, AreaPropertyPanelBase, ToolbarHdl_Impl)); diff --git a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx index 7c4a8dc59962..581d302a9d7d 100644 --- a/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx +++ b/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx @@ -25,20 +25,20 @@ namespace svx::sidebar { -AreaTransparencyGradientPopup::AreaTransparencyGradientPopup(AreaPropertyPanelBase& rPanel, weld::Widget* pParent) - : mrAreaPropertyPanel(rPanel) - , mxBuilder(Application::CreateBuilder(pParent, "svx/ui/floatingareastyle.ui")) - , mxTopLevel(mxBuilder->weld_container("FloatingAreaStyle")) - , mxCenterGrid(mxBuilder->weld_widget("centergrid")) - , mxAngleGrid(mxBuilder->weld_widget("anglegrid")) - , mxMtrTrgrCenterX(mxBuilder->weld_metric_spin_button("centerx", FieldUnit::PERCENT)) - , mxMtrTrgrCenterY(mxBuilder->weld_metric_spin_button("centery", FieldUnit::PERCENT)) - , mxMtrTrgrAngle(mxBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE)) - , mxBtnLeft45(mxBuilder->weld_toolbar("lefttoolbox")) - , mxBtnRight45(mxBuilder->weld_toolbar("righttoolbox")) - , mxMtrTrgrStartValue(mxBuilder->weld_metric_spin_button("start", FieldUnit::PERCENT)) - , mxMtrTrgrEndValue(mxBuilder->weld_metric_spin_button("end", FieldUnit::PERCENT)) - , mxMtrTrgrBorder(mxBuilder->weld_metric_spin_button("border", FieldUnit::PERCENT)) +AreaTransparencyGradientPopup::AreaTransparencyGradientPopup(const css::uno::Reference<css::frame::XFrame>& rFrame, + AreaPropertyPanelBase& rPanel, weld::Widget* pParent) + : WeldToolbarPopup(rFrame, pParent, "svx/ui/floatingareastyle.ui", "FloatingAreaStyle") + , mrAreaPropertyPanel(rPanel) + , mxCenterGrid(m_xBuilder->weld_widget("centergrid")) + , mxAngleGrid(m_xBuilder->weld_widget("anglegrid")) + , mxMtrTrgrCenterX(m_xBuilder->weld_metric_spin_button("centerx", FieldUnit::PERCENT)) + , mxMtrTrgrCenterY(m_xBuilder->weld_metric_spin_button("centery", FieldUnit::PERCENT)) + , mxMtrTrgrAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE)) + , mxBtnLeft45(m_xBuilder->weld_toolbar("lefttoolbox")) + , mxBtnRight45(m_xBuilder->weld_toolbar("righttoolbox")) + , mxMtrTrgrStartValue(m_xBuilder->weld_metric_spin_button("start", FieldUnit::PERCENT)) + , mxMtrTrgrEndValue(m_xBuilder->weld_metric_spin_button("end", FieldUnit::PERCENT)) + , mxMtrTrgrBorder(m_xBuilder->weld_metric_spin_button("border", FieldUnit::PERCENT)) { Link<weld::MetricSpinButton&,void> aLink = LINK(this, AreaTransparencyGradientPopup, ModifiedTrgrHdl_Impl); mxMtrTrgrCenterX->connect_value_changed(aLink); @@ -49,7 +49,6 @@ 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() @@ -171,7 +170,7 @@ IMPL_LINK_NOARG(AreaTransparencyGradientPopup, Right_Click45_Impl, const OString ExecuteValueModify(nStartCol, nEndCol); } -IMPL_LINK_NOARG(AreaTransparencyGradientPopup, FocusHdl, weld::Widget&, void) +void AreaTransparencyGradientPopup::GrabFocus() { mxMtrTrgrCenterX->grab_focus(); } |