diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-31 16:16:37 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-12-10 14:06:43 +0100 |
commit | c4892a47195685cd36fe91be872206f517abc45b (patch) | |
tree | d41fc1d74e1e5a80be1082cb70e93867ff2117fd /include | |
parent | a862c49ad5944972f336231b31fe4ad5114672fc (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107523
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.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 b89cf0449ffb..89a4ad72d447 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(); virtual boost::property_tree::ptree DumpAsPropertyTree() override; protected: virtual Size calculateRequisition() const override; @@ -868,6 +871,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 8e91050cc3a5..20f219154ee1 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -270,6 +270,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 ScrolledWindow : virtual public Container |