summaryrefslogtreecommitdiff
path: root/vcl/qt5/QtBuilder.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-18 17:23:32 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-19 21:34:43 +0100
commit2172bb226ab29ff0e9ea8ebe1a498f83afb5c891 (patch)
treec8b4e4b41a06df06449db58ecbac581483922de2 /vcl/qt5/QtBuilder.cxx
parenta6cd97bd9c513a6131be1e7f46c44e2d135f8dc7 (diff)
tdf#130857 qt weld: Set GtkButton props for MenuButton
The GTK 3 GtkMenuButton [1] subclasses GtkButton [2]. Therefore, let QtBuilder apply the GtkButton properties for the QToolButton created for a "GtkMenuButton" object in a .ui file as well. This e.g. ensures that the menu button in the "File" -> "Templates" -> "Manage Templates" dialog gets the "Manage" label in a WIP branch where support for that dialog using native Qt widgets is declared. [1] https://docs.gtk.org/gtk3/class.MenuButton.html [2] https://docs.gtk.org/gtk3/class.Button.html Change-Id: I3f2e7b701776476a6677d2bb324ffbdd4956f471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180461 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'vcl/qt5/QtBuilder.cxx')
-rw-r--r--vcl/qt5/QtBuilder.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
index 1dafdae0ee57..132d9e8a38c0 100644
--- a/vcl/qt5/QtBuilder.cxx
+++ b/vcl/qt5/QtBuilder.cxx
@@ -801,7 +801,7 @@ void QtBuilder::setProperties(QObject* pObject, stringmap& rProps)
}
}
-void QtBuilder::setButtonProperties(QPushButton& rButton, stringmap& rProps)
+void QtBuilder::setButtonProperties(QAbstractButton& rButton, stringmap& rProps)
{
for (auto const & [ rKey, rValue ] : rProps)
{
@@ -846,6 +846,8 @@ void QtBuilder::setMenuButtonProperties(QToolButton& rButton, stringmap& rProps)
assert(pMenu && "menu button references non-existing menu");
rButton.setMenu(pMenu);
}
+
+ setButtonProperties(rButton, rProps);
}
void QtBuilder::setScaleProperties(QSlider& rSlider, stringmap& rProps)