diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-31 16:16:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-01 19:38:11 +0200 |
commit | ea79a34ec7ffee6f86f16172c9e5fd75257539ca (patch) | |
tree | 4d44212158739c7c8658878b0537feae6c56c6ee /include | |
parent | d2974701e7f9e138ad952eeccb279567b5b309b1 (diff) |
allow sorting buttons via weld::Box
Change-Id: I315fe2dd2e40c976edd802c1e87b7ccdb0c298fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95221
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/layout.hxx | 8 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 8a5b881644e4..67e856fabdca 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -94,6 +94,10 @@ public: { m_bHomogeneous = bHomogeneous; } + bool get_orientation() const + { + return m_bVerticalContainer; + } virtual bool set_property(const OString &rKey, const OUString &rValue) override; virtual boost::property_tree::ptree DumpAsPropertyTree() override; protected: @@ -211,7 +215,6 @@ public: { } virtual bool set_property(const OString &rKey, const OUString &rValue) override; - void sort_native_button_order(); protected: virtual Size calculateRequisition() const override; virtual void setAllocation(const Size &rAllocation) override; @@ -853,6 +856,9 @@ Size getLegacyBestSizeForChildren(const vcl::Window &rWindow); //Get first parent which is not a layout widget vcl::Window* getNonLayoutParent(vcl::Window *pParent); +//Sort ok/cancel etc buttons in platform order +void sort_native_button_order(VclBox& rContainer); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 58309c9e49ef..9d01a0fc7022 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -290,6 +290,8 @@ class VCL_DLLPUBLIC Box : virtual public Container public: // Moves child to a new position in the list of children virtual void reorder_child(weld::Widget* pWidget, int position) = 0; + // Sort ok/cancel etc buttons in platform order + virtual void sort_native_button_order() = 0; }; class VCL_DLLPUBLIC Paned : virtual public Container |