vcl/qt5/QtBuilder.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 4d91b67e1f0dbd73ee594c6539d08a6ebc935b7e
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Sat Dec 7 22:08:14 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sun Dec 8 01:22:39 2024 +0100

    tdf#130857 qt weld: Evaluate button box orientation
    
    Set orientation to vertical if that's specified
    in the .ui file instead of using the default of
    horizontal.
    
    This is used by the button box on the right hand side
    of the "Tools" -> "XML Filter Settings" dialog.
    
    Change-Id: I64460037649dcd24897c7a5d7148430836702edc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178064
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
index e282ce872790..95a27a2ec162 100644
--- a/vcl/qt5/QtBuilder.cxx
+++ b/vcl/qt5/QtBuilder.cxx
@@ -164,7 +164,10 @@ QObject* QtBuilder::makeObject(QObject* pParent, 
std::u16string_view sName, std:
         }
         else
         {
-            pObject = new QDialogButtonBox(pParentWidget);
+            QDialogButtonBox* pButtonBox = new QDialogButtonBox(pParentWidget);
+            if (hasOrientationVertical(rMap))
+                pButtonBox->setOrientation(Qt::Vertical);
+            pObject = pButtonBox;
         }
     }
     else if (sName == u"GtkButton")

Reply via email to