include/svx/sidebar/LinePropertyPanelBase.hxx | 1 + svx/source/sidebar/line/LinePropertyPanelBase.cxx | 7 +++++++ 2 files changed, 8 insertions(+)
New commits: commit f8aa0ff0e7eb08d5822858688dc525ec0201b09e Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Sep 14 19:55:01 2025 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Sep 15 09:44:42 2025 +0200 Resolves: tdf#168306 set current line width at popup time Change-Id: I82c8151566459d1429cd3b4517b43ace3fbeca60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190934 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> (cherry picked from commit 830a06afe26279edc3527ccdecb5c9e2b347cfd5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190935 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/include/svx/sidebar/LinePropertyPanelBase.hxx b/include/svx/sidebar/LinePropertyPanelBase.hxx index dec342627083..ba01992c5c37 100644 --- a/include/svx/sidebar/LinePropertyPanelBase.hxx +++ b/include/svx/sidebar/LinePropertyPanelBase.hxx @@ -113,6 +113,7 @@ private: void Initialize(); DECL_DLLPRIVATE_LINK(ToolboxWidthSelectHdl, const OUString&, void); + DECL_DLLPRIVATE_LINK(ToolboxWidthToggleMenuHdl, const OUString&, void); DECL_DLLPRIVATE_LINK(ChangeTransparentHdl, weld::MetricSpinButton&, void); }; diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index afbc03983cef..cec5d9a1dc2b 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -124,6 +124,7 @@ void LinePropertyPanelBase::Initialize() Graphic aGraf(maIMGWidthIcon[0]); mxTBWidth->set_item_image(SELECTWIDTH, aGraf.GetXGraphic()); mxTBWidth->connect_clicked(LINK(this, LinePropertyPanelBase, ToolboxWidthSelectHdl)); + mxTBWidth->connect_menu_toggled(LINK(this, LinePropertyPanelBase, ToolboxWidthToggleMenuHdl)); mxMFTransparent->connect_value_changed(LINK(this, LinePropertyPanelBase, ChangeTransparentHdl)); @@ -193,6 +194,12 @@ IMPL_LINK_NOARG(LinePropertyPanelBase, ToolboxWidthSelectHdl, const OUString&, v mxTBWidth->set_menu_item_active(SELECTWIDTH, !mxTBWidth->get_menu_item_active(SELECTWIDTH)); } +IMPL_LINK_NOARG(LinePropertyPanelBase, ToolboxWidthToggleMenuHdl, const OUString&, void) +{ + if (mxTBWidth->get_menu_item_active(SELECTWIDTH)) + mxLineWidthPopup->SetWidthSelect(mnWidthCoreValue, mbWidthValuable, meMapUnit); +} + void LinePropertyPanelBase::EndLineWidthPopup() { mxTBWidth->set_menu_item_active(SELECTWIDTH, false);