vcl/qt5/QtInstanceCheckButton.cxx | 6 ++++-- vcl/qt5/QtInstanceRadioButton.cxx | 6 ++++-- vcl/uiconfig/ui/printdialog.ui | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-)
New commits: commit b59d61f9091116b0a63232f264e52f601cf279fb Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jul 18 15:24:14 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Jul 18 18:13:31 2025 +0200 a11y: Set mnemonic widgets in print dialog This ensures that the corresponding a11y relation is set and e.g. the Orca screen reader announces the associated label when the "Number of copies" spin button or the "Include" combobox (for even/odd pages) receive focus. Change-Id: Id2399c87cf934d16addabd34ebf503baaf21121f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188039 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui index 6f0aa80d05fd..ec3e5e55ce37 100644 --- a/vcl/uiconfig/ui/printdialog.ui +++ b/vcl/uiconfig/ui/printdialog.ui @@ -615,6 +615,7 @@ <property name="halign">start</property> <property name="label" translatable="yes" context="printdialog|labelcopies">_Number of copies:</property> <property name="use-underline">True</property> + <property name="mnemonic-widget">copycount</property> <property name="xalign">1</property> </object> <packing> @@ -829,6 +830,7 @@ <property name="halign">start</property> <property name="label" translatable="yes" context="printdialog|includeevenodd">Include:</property> <property name="use-underline">True</property> + <property name="mnemonic-widget">evenoddbox</property> <property name="xalign">0</property> </object> <packing> commit e702e7972d44a6132536c0da3493025143b2da8a Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Jul 18 15:07:30 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Jul 18 18:13:18 2025 +0200 tdf#130857 qt weld: Convert accelerators for check/radio buttons Convert the accelerators between the Qt and VCL version as needed. In a WIP branch declaring support for the print dialog, this makes the correct text show up instead of a literal "~All Pages" for a radio button and "Page ba~ckground" for a checkbox. Change-Id: Ic73af5e654b00b4e6dae1d561465604c8e9b46c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188038 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtInstanceCheckButton.cxx b/vcl/qt5/QtInstanceCheckButton.cxx index e92afa8488f8..cdd5fb3e4571 100644 --- a/vcl/qt5/QtInstanceCheckButton.cxx +++ b/vcl/qt5/QtInstanceCheckButton.cxx @@ -40,13 +40,15 @@ TriState QtInstanceCheckButton::get_state() const void QtInstanceCheckButton::set_label(const OUString& rText) { SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { m_pCheckBox->setText(toQString(rText)); }); + GetQtInstance().RunInMainThread( + [&] { m_pCheckBox->setText(vclToQtStringWithAccelerator(rText)); }); } OUString QtInstanceCheckButton::get_label() const { SolarMutexGuard g; OUString sLabel; - GetQtInstance().RunInMainThread([&] { sLabel = toOUString(m_pCheckBox->text()); }); + GetQtInstance().RunInMainThread( + [&] { sLabel = qtToVclStringWithAccelerator(m_pCheckBox->text()); }); return sLabel; } diff --git a/vcl/qt5/QtInstanceRadioButton.cxx b/vcl/qt5/QtInstanceRadioButton.cxx index e9cf7b658ef5..9c8ba8148535 100644 --- a/vcl/qt5/QtInstanceRadioButton.cxx +++ b/vcl/qt5/QtInstanceRadioButton.cxx @@ -37,13 +37,15 @@ bool QtInstanceRadioButton::get_active() const void QtInstanceRadioButton::set_label(const OUString& rText) { SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { m_pRadioButton->setText(toQString(rText)); }); + GetQtInstance().RunInMainThread( + [&] { m_pRadioButton->setText(vclToQtStringWithAccelerator(rText)); }); } OUString QtInstanceRadioButton::get_label() const { SolarMutexGuard g; OUString sLabel; - GetQtInstance().RunInMainThread([&] { sLabel = toOUString(m_pRadioButton->text()); }); + GetQtInstance().RunInMainThread( + [&] { sLabel = qtToVclStringWithAccelerator(m_pRadioButton->text()); }); return sLabel; }