diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-06-28 15:38:32 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-07-29 12:25:20 +0200 |
commit | a30e71bc1184d30bc9c95c2e02779660d58e3be9 (patch) | |
tree | 5a08f547ac953ed4d542cac86648b950b062b7fd /svx/source/sidebar | |
parent | b206dda731e7c4390d6c9fe9c66feb8e903d3786 (diff) |
sidebar: unify LineWidthPopup with other WeldToolbarPopups
Change-Id: I9dd0d2b223972683a9066f0069e055175349526f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118023
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119654
Tested-by: Jenkins
Diffstat (limited to 'svx/source/sidebar')
-rw-r--r-- | svx/source/sidebar/line/LineWidthPopup.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/svx/source/sidebar/line/LineWidthPopup.cxx b/svx/source/sidebar/line/LineWidthPopup.cxx index 6cd19ce7305c..347bb2a3bb8d 100644 --- a/svx/source/sidebar/line/LineWidthPopup.cxx +++ b/svx/source/sidebar/line/LineWidthPopup.cxx @@ -32,7 +32,8 @@ namespace svx::sidebar { LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rParent) - : m_rParent(rParent) + : WeldToolbarPopup(nullptr, pParent, "svx/ui/floatinglineproperty.ui", "FloatingLineProperty") + , m_rParent(rParent) , m_sPt(SvxResId(RID_SVXSTR_PT)) , m_eMapUnit(MapUnit::MapTwip) , m_bVSFocus(true) @@ -40,14 +41,10 @@ LineWidthPopup::LineWidthPopup(weld::Widget* pParent, LinePropertyPanelBase& rPa , m_nCustomWidth(0) , m_aIMGCus(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM) , m_aIMGCusGray(StockImage::Yes, RID_SVXBMP_WIDTH_CUSTOM_GRAY) - , m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/floatinglineproperty.ui")) - , m_xTopLevel(m_xBuilder->weld_container("FloatingLineProperty")) , m_xMFWidth(m_xBuilder->weld_metric_spin_button("spin", FieldUnit::POINT)) , m_xVSWidth(new LineWidthValueSet()) , m_xVSWidthWin(new weld::CustomWeld(*m_xBuilder, "lineset", *m_xVSWidth)) { - m_xTopLevel->connect_focus_in(LINK(this, LineWidthPopup, FocusHdl)); - m_xVSWidth->SetStyle(m_xVSWidth->GetStyle() | WB_3DLOOK | WB_NO_DIRECTSELECT); maStrUnits[0] = "0.5"; @@ -213,7 +210,7 @@ void LineWidthPopup::SetWidthSelect(tools::Long lValue, bool bValuable, MapUnit m_xVSWidth->Invalidate(); } -IMPL_LINK_NOARG(LineWidthPopup, FocusHdl, weld::Widget&, void) +void LineWidthPopup::GrabFocus() { if (m_bVSFocus) m_xVSWidth->GrabFocus(); |