include/vcl/layout.hxx | 2 ++ vcl/source/window/builder.cxx | 2 ++ vcl/source/window/layout.cxx | 11 +++++++++++ 3 files changed, 15 insertions(+)
New commits: commit a9eab8cef6f241b453c1dba30b0ebf2f61853301 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Nov 10 16:18:34 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Nov 10 21:06:36 2020 +0100 allow VclBuilder to set expander label attributes Change-Id: I0b78db778d230509e6bbb59d965540a5f5d6f3de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105559 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index e91bb629ff1d..d2c5893ed516 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -484,6 +484,8 @@ public: bool get_expanded() const; void set_expanded(bool bExpanded); void set_label(const OUString& rLabel); + vcl::Window *get_label_widget(); + const vcl::Window *get_label_widget() const; virtual void StateChanged(StateChangedType nType) override; void SetExpandedHdl( const Link<VclExpander&,void>& rLink ) { maExpandedHdl = rLink; } private: diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 930dbfaab600..d50444f1f3f4 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -782,6 +782,8 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr { FixedText *pLabelWidget = static_cast<FixedText*>(pLabel); elem->set_label(pLabelWidget->GetText()); + if (pLabelWidget->IsControlFont()) + elem->get_label_widget()->SetControlFont(pLabelWidget->GetControlFont()); delete_by_window(pLabel); } } diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 6cbc00e05e72..d4b89b7c51a0 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1773,6 +1773,17 @@ void VclExpander::StateChanged(StateChangedType nType) } } +const vcl::Window *VclExpander::get_label_widget() const +{ + return m_pDisclosureButton; +} + +vcl::Window *VclExpander::get_label_widget() +{ + return const_cast<vcl::Window*>(const_cast<const VclExpander*>(this)->get_label_widget()); +} + + IMPL_LINK( VclExpander, ClickHdl, CheckBox&, rBtn, void ) { vcl::Window *pChild = get_child(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits