cui/uiconfig/ui/fontfragment.ui | 44 ++++++++++++++++++++-------------------- vcl/qt5/QtBuilder.cxx | 8 +++++++ 2 files changed, 30 insertions(+), 22 deletions(-)
New commits: commit 3555c488c6c893dc0ff184a3753e0a3e7f614ec1 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Apr 11 13:30:02 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Apr 11 19:44:26 2025 +0200 tdf#130857 qt weld: Evaluate "inconsistent" prop for checkbuttons For check boxes/buttons, evaluate the GtkToggleButton::inconsistent [1] property when processing the .ui file and set corresponding QCheckBox properties when true. This is used e.g. in cui/uiconfig/ui/fontfragment.ui which is used in the "Font Features" dialog (which is not yet supported by QtInstanceBuilder, but this commit prepares for it). [1] https://docs.gtk.org/gtk3/property.ToggleButton.inconsistent.html Change-Id: If9a2aaee64998f0fe41c93ca42e4108ff46733d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184038 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index c57977ddf899..d80ed71e1666 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -817,6 +817,14 @@ void QtBuilder::setCheckButtonProperties(QAbstractButton& rButton, stringmap& rP { if (rKey == u"active") rButton.setChecked(toBool(rValue)); + else if (rKey == u"inconsistent" && toBool(rValue)) + { + if (QCheckBox* pCheckBox = qobject_cast<QCheckBox*>(&rButton)) + { + pCheckBox->setTristate(true); + pCheckBox->setCheckState(Qt::PartiallyChecked); + } + } else if (rKey == u"label") rButton.setText(convertAccelerator(rValue)); } commit 2e79f370ee462e411d3c0d87b058760c5c6fe624 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Apr 11 13:11:47 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Apr 11 19:44:17 2025 +0200 cui: Resave fontfragment.ui with glade 3.40 This .ui file is used within the "Font Features" dialog that can e.g. be triggered from Writer using "Format" -> "Character", then click the "Features" button in the "Character" dialog. Change-Id: I076bdad8c9fff2d597526e0dac57d22c1eb57c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184037 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/cui/uiconfig/ui/fontfragment.ui b/cui/uiconfig/ui/fontfragment.ui index dca735e5fe1e..ceb520c3177f 100644 --- a/cui/uiconfig/ui/fontfragment.ui +++ b/cui/uiconfig/ui/fontfragment.ui @@ -1,51 +1,51 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=1 --> <object class="GtkGrid" id="fontentry"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> <property name="valign">center</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="column_spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkLabel" id="label"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">combo</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">combo</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkCheckButton" id="check"> - <property name="label" translatable="no">placeholder</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="no_show_all">True</property> + <property name="label">placeholder</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="no-show-all">True</property> <property name="inconsistent">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">0</property> + <property name="left-attach">2</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkComboBoxText" id="combo"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object>