include/vcl/layout.hxx | 1 + vcl/source/window/layout.cxx | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+)
New commits: commit 479bba2cdcda8dbd86861ea62c8c25bfef633148 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jul 12 11:40:27 2013 +0100 Related: fdo#66817 ensure VclExpander label is mnemonic for disclosure button Change-Id: I11c9a35e3d50a827127e4542a40f6f29580d4e8b diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index ede844e..f72b93a 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -516,6 +516,7 @@ public: virtual Window *get_child(); virtual const Window *get_child() const; virtual bool set_property(const OString &rKey, const OString &rValue); + virtual void StateChanged(StateChangedType nType); protected: virtual Size calculateRequisition() const; virtual void setAllocation(const Size &rAllocation); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 2f1d404..1794671 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1468,6 +1468,25 @@ bool VclExpander::set_property(const OString &rKey, const OString &rValue) return true; } +void VclExpander::StateChanged(StateChangedType nType) +{ + VclBin::StateChanged( nType ); + + if (nType == STATE_CHANGE_INITSHOW) + { + //The label widget is the last (of two) children + Window *pChild = get_child(); + WindowImpl* pWindowImpl = ImplGetWindowImpl(); + Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild : NULL; + if (pLabel && pLabel->GetType() == WINDOW_FIXEDTEXT) + { + FixedText *pLabelWidget = static_cast<FixedText*>(pLabel); + if (!pLabelWidget->get_mnemonic_widget()) + pLabelWidget->set_mnemonic_widget(&m_aDisclosureButton); + } + } +} + IMPL_LINK( VclExpander, ClickHdl, DisclosureButton*, pBtn ) { Window *pChild = get_child();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits