sw/uiconfig/swriter/ui/cardmediumpage.ui | 1 sw/uiconfig/swriter/ui/labelformatpage.ui | 292 +++++++++++++++--------------- vcl/qt5/QtInstanceBuilder.cxx | 5 3 files changed, 152 insertions(+), 146 deletions(-)
New commits: commit a282f653655fc656a0c2b8ddf3018d9a785afa85 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 11 21:14:41 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Feb 12 09:56:32 2026 +0100 tdf#130857 Define widgets in "Labels" dialog in order Switch the order in which the widgets in the .ui file are defined so that the order better matches the visual appearance and logical order, which makes sure that tab focus order with the Qt-based VCL plugins is correct as well when using native Qt widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where focus order is (by default) based on widget creation order. See commit 02692566ad9fc7c3484f8581ffa0004cd4e43987 Author: Michael Weghorn <[email protected]> Date: Thu Oct 24 17:43:35 2024 +0200 tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order for more background. The dialog can be triggered like this: * start Writer * "File" -> "New" -> "Labels" Change-Id: I833beb76890142d6186ed70dd336eea628adb5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199217 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/uiconfig/swriter/ui/labelformatpage.ui b/sw/uiconfig/swriter/ui/labelformatpage.ui index 1b06f294d346..4ef520e8e4e0 100644 --- a/sw/uiconfig/swriter/ui/labelformatpage.ui +++ b/sw/uiconfig/swriter/ui/labelformatpage.ui @@ -43,152 +43,6 @@ <property name="top-attach">0</property> </packing> </child> - <child> - <object class="GtkLabel" id="label2"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label2">_Vertical pitch:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">vert</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label3">_Width:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">width</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label4">_Height:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">height</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label5">_Left margin:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">left</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label6">_Top margin:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">top</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">5</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label7"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label7">_Columns:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">cols</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">6</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label8"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label8">R_ows:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">rows</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">7</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label9"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label9">P_age width:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">pagewidth</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">8</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="labelformatpage|label10">Pa_ge height:</property> - <property name="use-underline">True</property> - <property name="mnemonic-widget">pageheight</property> - <property name="xalign">1</property> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">9</property> - </packing> - </child> - <child> - <object class="GtkButton" id="save"> - <property name="label" translatable="yes" context="labelformatpage|save">_Save...</property> - <property name="visible">True</property> - <property name="can-focus">True</property> - <property name="receives-default">True</property> - <property name="halign">end</property> - <property name="use-underline">True</property> - <child internal-child="accessible"> - <object class="AtkObject" id="save-atkobject"> - <property name="AtkObject::accessible-description" translatable="yes" context="labelformatpage|extended_tip|save">Saves the current label or business card format.</property> - </object> - </child> - </object> - <packing> - <property name="left-attach">0</property> - <property name="top-attach">10</property> - <property name="width">2</property> - </packing> - </child> <child> <object class="GtkSpinButton" id="hori"> <property name="visible">True</property> @@ -207,6 +61,20 @@ <property name="top-attach">0</property> </packing> </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label2">_Vertical pitch:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">vert</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="vert"> <property name="visible">True</property> @@ -225,6 +93,20 @@ <property name="top-attach">1</property> </packing> </child> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label3">_Width:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">width</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="width"> <property name="visible">True</property> @@ -243,6 +125,20 @@ <property name="top-attach">2</property> </packing> </child> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label4">_Height:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">height</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">3</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="height"> <property name="visible">True</property> @@ -261,6 +157,20 @@ <property name="top-attach">3</property> </packing> </child> + <child> + <object class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label5">_Left margin:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">left</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="left"> <property name="visible">True</property> @@ -279,6 +189,20 @@ <property name="top-attach">4</property> </packing> </child> + <child> + <object class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label6">_Top margin:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">top</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">5</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="top"> <property name="visible">True</property> @@ -297,6 +221,20 @@ <property name="top-attach">5</property> </packing> </child> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label7">_Columns:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">cols</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">6</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="cols"> <property name="visible">True</property> @@ -315,6 +253,20 @@ <property name="top-attach">6</property> </packing> </child> + <child> + <object class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label8">R_ows:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">rows</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">7</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="rows"> <property name="visible">True</property> @@ -333,6 +285,20 @@ <property name="top-attach">7</property> </packing> </child> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label9">P_age width:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">pagewidth</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">8</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="pagewidth"> <property name="visible">True</property> @@ -346,6 +312,20 @@ <property name="top-attach">8</property> </packing> </child> + <child> + <object class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes" context="labelformatpage|label10">Pa_ge height:</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">pageheight</property> + <property name="xalign">1</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">9</property> + </packing> + </child> <child> <object class="GtkSpinButton" id="pageheight"> <property name="visible">True</property> @@ -359,6 +339,26 @@ <property name="top-attach">9</property> </packing> </child> + <child> + <object class="GtkButton" id="save"> + <property name="label" translatable="yes" context="labelformatpage|save">_Save...</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="halign">end</property> + <property name="use-underline">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="save-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="labelformatpage|extended_tip|save">Saves the current label or business card format.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">10</property> + <property name="width">2</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> commit e05d60c6492efa56955d956a2c900066ca337488 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 11 21:07:41 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Feb 12 09:56:25 2026 +0100 sw a11y: Leave label text view on simple tab key Set the "accepts-tab" property to false for the GtkTextView where the label be set, so pressing the tab key moves focus to the next field in the dialog, instead of inserting a literal tab character. This simplifies using the dialog when using the keyboard only. For the VCL and GTK implementations, pressing Ctrl+Tab would previously be needed to move focus, which is less intuitive. Setting the property does not technically prevent inserting tabs, they could still be inserted by copy-pasting text containing tabs; just pressing the tab key while the text view has focus won't insert them any more. This is in the "Labels" dialog that can be triggered like this: * start Writer * "File" -> "New" -> "Labels" Change-Id: I992077fa550a8ba414f6f1191ade5f489771b178 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199216 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/sw/uiconfig/swriter/ui/cardmediumpage.ui b/sw/uiconfig/swriter/ui/cardmediumpage.ui index 19a4bb9463e4..5e9b526aeb11 100644 --- a/sw/uiconfig/swriter/ui/cardmediumpage.ui +++ b/sw/uiconfig/swriter/ui/cardmediumpage.ui @@ -108,6 +108,7 @@ <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="accepts-tab">False</property> <child internal-child="accessible"> <object class="AtkObject" id="textview-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="cardmediumpage|extended_tip|textview">Enter the text that you want to appear on the label. You can also insert a database field.</property> commit bcb252078b78039890a61fb013e8d8b866a73ee4 Author: Michael Weghorn <[email protected]> AuthorDate: Wed Feb 11 21:05:27 2026 +0100 Commit: Michael Weghorn <[email protected]> CommitDate: Thu Feb 12 09:56:18 2026 +0100 tdf#130857 qt weld: Support "Labels" dialog This means that native Qt widgets are used for that dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. The dialog can be triggered like this: * start Writer * "File" -> "New" -> "Labels" Change-Id: I11b63753222848f9915f107d6ef07f7b54ace9c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199215 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 3845d4948e3d..dbed3639c504 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -211,6 +211,7 @@ constexpr auto SUPPORTED_UI_FILES = frozen::make_unordered_set<std::u16string_vi u"modules/swriter/ui/insertbreak.ui", u"modules/swriter/ui/insertcaption.ui", u"modules/swriter/ui/inserttable.ui", + u"modules/swriter/ui/labeldialog.ui", u"modules/swriter/ui/linenumbering.ui", u"modules/swriter/ui/numberingnamedialog.ui", u"modules/swriter/ui/outlinenumbering.ui", @@ -302,6 +303,7 @@ constexpr auto SUPPORTED_WITH_QT_PARENT = frozen::make_unordered_set<std::u16str u"cui/ui/optlingupage.ui", u"cui/ui/possizetabpage.ui", u"cui/ui/rotationtabpage.ui", + u"cui/ui/spinbox.ui", u"cui/ui/slantcornertabpage.ui", u"cui/ui/textattrtabpage.ui", u"cui/ui/textanimtabpage.ui", @@ -335,6 +337,7 @@ constexpr auto SUPPORTED_WITH_QT_PARENT = frozen::make_unordered_set<std::u16str u"modules/spropctrlr/ui/textfield.ui", u"modules/spropctrlr/ui/urlcontrol.ui", u"modules/swriter/ui/bibliofragment.ui", + u"modules/swriter/ui/cardmediumpage.ui", u"modules/swriter/ui/columnpage.ui", u"modules/swriter/ui/flddbpage.ui", u"modules/swriter/ui/flddocinfopage.ui", @@ -342,6 +345,8 @@ constexpr auto SUPPORTED_WITH_QT_PARENT = frozen::make_unordered_set<std::u16str u"modules/swriter/ui/fldfuncpage.ui", u"modules/swriter/ui/fldrefpage.ui", u"modules/swriter/ui/fldvarpage.ui", + u"modules/swriter/ui/labelformatpage.ui", + u"modules/swriter/ui/labeloptionspage.ui", u"modules/swriter/ui/optcaptionpage.ui", u"modules/swriter/ui/outlinenumberingpage.ui", u"modules/swriter/ui/outlinepositionpage.ui",
