vcl/qt5/QtBuilder.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8e43a6c4c1eed2a12c651613c2dbee7d1988c776
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Apr 30 22:38:22 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu May 1 23:09:38 2025 +0200

    tdf#130857 qt weld: Evaluate "label" property for tool buttons
    
    Evaluate the GtkToolButton::label property for "GtkToolButton"
    objects in .ui files, and set the text for the QToolButton based
    on it.
    
    This e.g. makes the Orca screen reader announce the "Paste" and
    "Special Characters" tool buttons in the spelling dialog as such
    instead of just saying "button" when they receive focus in a
    WIP branch adding support for that dialog with the qt6 VCL plugin
    and SAL_VCL_QT_USE_WELDED_WIDGETS=1.
    
    Change-Id: I35a1c6940881d47f6d788144ef221b089cbd67bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184847
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
index b6b1d73748c7..e06f9ab81dc2 100644
--- a/vcl/qt5/QtBuilder.cxx
+++ b/vcl/qt5/QtBuilder.cxx
@@ -361,6 +361,7 @@ QObject* QtBuilder::makeObject(QObject* pParent, 
std::u16string_view sName, std:
             const Image aImage = loadThemeImage(sIconName);
             pToolButton->setIcon(toQPixmap(aImage));
         }
+        pToolButton->setText(toQString(extractLabel(rMap)));
         pObject = pToolButton;
     }
     else if (sName == u"GtkTreeView")

Reply via email to