vcl/qt5/QtBuilder.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 5009ac0153a6f02f62795e6ea650527c46bd2a5e
Author: Michael Weghorn <[email protected]>
AuthorDate: Fri Oct 11 23:05:32 2024 +0200
Commit: Michael Weghorn <[email protected]>
CommitDate: Sat Oct 12 17:20:15 2024 +0200
tdf#130857 qt weld: Set visibility based on "visible" prop
Use BuilderBase::extractVisible to assess and set the visibility
of a QWidget created from a .ui file.
As described in the GTK 3 documentation of the corresponding
GtkWidget property [1], the default value is false, i.e. if
an object is not explicitly set as visible, it should not be
shown.
This will be needed e.g. by the
svtools/uiconfig/ui/restartdialog.ui
dialog shown when toggling experimental mode in
"Tools" -> "Options" and closing the dialog with
the "OK" button. Without this preparatory commit,
using native Qt widgets would result in all the
labels (with different reasons for restarting)
being shown at the same time.
This depends on previous commit
Change-Id: Ic7a932556e02f47ee6007b5167f82bef152e1ef0
Author: Michael Weghorn <[email protected]>
Date: Fri Oct 11 23:01:44 2024 +0200
tdf#130857 VclBuilder: Move internal child visible logic to base
to not cause buttons in dialogs to become invisible if
they're contained in the "internal" button box object
whose visibility is usually not explicitly set to True.
[1] https://docs.gtk.org/gtk3/property.Widget.visible.html
Change-Id: Iff254324a852a2fe73b3d9fcfe499bc8639380b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174834
Reviewed-by: Michael Weghorn <[email protected]>
Tested-by: Jenkins
diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
index 14a1ebd1b8c3..10c2c49bb6ec 100644
--- a/vcl/qt5/QtBuilder.cxx
+++ b/vcl/qt5/QtBuilder.cxx
@@ -183,6 +183,8 @@ QObject* QtBuilder::makeObject(QObject* pParent,
std::u16string_view sName, cons
QtInstanceWidget::setHelpId(*pWidget, getHelpRoot() + sID);
+ pWidget->setVisible(extractVisible(rMap));
+
#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
// Set GtkBuilder ID as accessible ID
pWidget->setAccessibleIdentifier(toQString(sID));