sw/uiconfig/swriter/ui/insertfootnote.ui |  165 +++++++++++++++----------------
 vcl/qt5/QtBuilder.cxx                    |   12 ++
 2 files changed, 92 insertions(+), 85 deletions(-)

New commits:
commit 83763196a3d610d6693de805e0747d8427a011d8
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri May 16 21:27:45 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat May 17 10:27:09 2025 +0200

    tdf#130857 qt weld: Fall back to icons from system (theme)
    
    If no icon for a given icon name can be found in the LibreOffice
    icon themes, fall back to using non-LibreOffice icon themes, e.g.
    the Breeze one used by default on KDE Plasma.
    
    This is e.g. relevant for the "go-previous" icon used in Writer's
    "Insert" -> "Footnote and Endnote" -> "Insert special Footnote/Endnote"
    dialog.
    
    Without this commit in place, this would trigger the
    
        assert(!aPixmap.isNull() && "Failed to create icon pixmap");
    
    in the `QPixmap toQPixmap(const BitmapEx& rBitmapEx)` helper
    in a WIP branch where support for that dialog is declared
    for SAL_VCL_QT_USE_WELDED_WIDGETS=1.
    
    The button using that icon isn't actually visible when
    triggering the dialog as described above, but is when
    right-clicking on an existing footnote anchor and selecting
    the "Footnote/Endnote" context menu entry to open the dialog
    for editing the existing footnote.
    
    Change-Id: I47f6bae6978e05787d3de83ccce8660b6a5d8301
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185435
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx
index bdf9848485a0..0087487bb747 100644
--- a/vcl/qt5/QtBuilder.cxx
+++ b/vcl/qt5/QtBuilder.cxx
@@ -255,7 +255,17 @@ QObject* QtBuilder::makeObject(QObject* pParent, 
std::u16string_view sName, std:
         if (!sIconName.isEmpty())
         {
             const Image aImage = loadThemeImage(sIconName);
-            pLabel->setPixmap(toQPixmap(aImage));
+            if (!aImage.GetBitmapEx().IsEmpty())
+            {
+                pLabel->setPixmap(toQPixmap(aImage));
+            }
+            else
+            {
+                const QIcon aIcon = QIcon::fromTheme(toQString(sIconName));
+                assert(!aIcon.isNull() && "No icon found for that icon name");
+                const int nIconSize = 
QApplication::style()->pixelMetric(QStyle::PM_ButtonIconSize);
+                pLabel->setPixmap(aIcon.pixmap(nIconSize));
+            }
         }
         pObject = pLabel;
     }
commit 4c46569bcf54ee454147ad0531c6e14ec6c68fe7
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri May 16 21:14:02 2025 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Sat May 17 10:27:02 2025 +0200

    sw: Resave insertfootnote.ui with glade 3.40
    
    This dialog can be triggered using "Insert" -> "Footnote and Endnote"
    -> "Insert special Footnote/Endnote" in Writer.
    
    Change-Id: I40a9bcb77015581dde6e983bff5668fef84c898b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185434
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/uiconfig/swriter/ui/insertfootnote.ui 
b/sw/uiconfig/swriter/ui/insertfootnote.ui
index bce297086093..249fee081c8f 100644
--- a/sw/uiconfig/swriter/ui/insertfootnote.ui
+++ b/sw/uiconfig/swriter/ui/insertfootnote.ui
@@ -1,46 +1,46 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.36.0 -->
+<!-- Generated with glade 3.40.0 -->
 <interface domain="sw">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkImage" id="image1">
     <property name="visible">True</property>
-    <property name="can_focus">False</property>
+    <property name="can-focus">False</property>
     <property name="icon-name">go-previous</property>
   </object>
   <object class="GtkImage" id="image2">
     <property name="visible">True</property>
-    <property name="can_focus">False</property>
+    <property name="can-focus">False</property>
     <property name="icon-name">go-next</property>
   </object>
   <object class="GtkDialog" id="InsertFootnoteDialog">
-    <property name="can_focus">False</property>
-    <property name="border_width">6</property>
+    <property name="can-focus">False</property>
+    <property name="border-width">6</property>
     <property name="title" translatable="yes" 
context="insertfootnote|InsertFootnoteDialog">Insert Footnote/Endnote</property>
     <property name="modal">True</property>
-    <property name="default_width">0</property>
-    <property name="default_height">0</property>
-    <property name="type_hint">dialog</property>
+    <property name="default-width">0</property>
+    <property name="default-height">0</property>
+    <property name="type-hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
-        <property name="can_focus">False</property>
+        <property name="can-focus">False</property>
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child internal-child="action_area">
           <object class="GtkButtonBox" id="dialog-action_area1">
-            <property name="can_focus">False</property>
-            <property name="layout_style">end</property>
+            <property name="can-focus">False</property>
+            <property name="layout-style">end</property>
             <child>
-              <!-- n-columns=1 n-rows=1 -->
+              <!-- n-columns=2 n-rows=1 -->
               <object class="GtkGrid" id="grid2">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="column_spacing">6</property>
-                <property name="column_homogeneous">True</property>
+                <property name="can-focus">False</property>
+                <property name="column-spacing">6</property>
+                <property name="column-homogeneous">True</property>
                 <child>
                   <object class="GtkButton" id="prev">
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="tooltip_text" translatable="yes" 
context="insertfootnote|prev">Previous footnote/endnote</property>
+                    <property name="can-focus">True</property>
+                    <property name="receives-default">True</property>
+                    <property name="tooltip-text" translatable="yes" 
context="insertfootnote|prev">Previous footnote/endnote</property>
                     <property name="image">image1</property>
                     <property name="always-show-image">True</property>
                     <child internal-child="accessible">
@@ -50,15 +50,15 @@
                     </child>
                   </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="GtkButton" id="next">
-                    <property name="can_focus">True</property>
-                    <property name="receives_default">True</property>
-                    <property name="tooltip_text" translatable="yes" 
context="insertfootnote|next">Next footnote/endnote</property>
+                    <property name="can-focus">True</property>
+                    <property name="receives-default">True</property>
+                    <property name="tooltip-text" translatable="yes" 
context="insertfootnote|next">Next footnote/endnote</property>
                     <property name="image">image2</property>
                     <property name="always-show-image">True</property>
                     <child internal-child="accessible">
@@ -68,8 +68,8 @@
                     </child>
                   </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>
@@ -83,10 +83,10 @@
               <object class="GtkButton" id="ok">
                 <property name="label" translatable="yes" 
context="stock">_OK</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
+                <property name="can-focus">True</property>
+                <property name="can-default">True</property>
+                <property name="has-default">True</property>
+                <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
               <packing>
@@ -99,8 +99,8 @@
               <object class="GtkButton" id="cancel">
                 <property name="label" translatable="yes" 
context="stock">_Cancel</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
               <packing>
@@ -113,8 +113,8 @@
               <object class="GtkButton" id="help">
                 <property name="label" translatable="yes" 
context="stock">_Help</property>
                 <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">True</property>
                 <property name="use-underline">True</property>
               </object>
               <packing>
@@ -128,42 +128,42 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="pack_type">end</property>
+            <property name="pack-type">end</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
           <object class="GtkBox" id="box1">
             <property name="visible">True</property>
-            <property name="can_focus">False</property>
+            <property name="can-focus">False</property>
             <property name="orientation">vertical</property>
             <property name="spacing">12</property>
             <child>
               <object class="GtkFrame" id="numberingframe">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
-                  <!-- n-columns=1 n-rows=1 -->
+                  <!-- n-columns=3 n-rows=2 -->
                   <object class="GtkGrid" id="grid1">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="halign">start</property>
-                    <property name="row_spacing">6</property>
-                    <property name="column_spacing">12</property>
                     <property name="margin-start">12</property>
                     <property name="margin-top">6</property>
+                    <property name="row-spacing">6</property>
+                    <property name="column-spacing">12</property>
                     <child>
                       <object class="GtkRadioButton" id="automatic">
                         <property name="label" translatable="yes" 
context="insertfootnote|automatic">Automatic</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="valign">center</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="automatic-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" 
context="insertfootnote|extended_tip|automatic">Automatically assigns 
consecutive numbers to the footnotes or endnotes that you insert.</property>
@@ -171,8 +171,8 @@
                         </child>
                       </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>
                         <property name="width">3</property>
                       </packing>
                     </child>
@@ -180,11 +180,11 @@
                       <object class="GtkRadioButton" id="character">
                         <property name="label" translatable="yes" 
context="insertfootnote|character">Character:</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="valign">center</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <property name="group">automatic</property>
                         <accessibility>
                           <relation type="label-for" target="characterentry"/>
@@ -196,23 +196,23 @@
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkEntry" id="characterentry">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
+                        <property name="can-focus">True</property>
                         <property name="halign">start</property>
                         <property name="valign">center</property>
-                        <property name="max_length">10</property>
-                        <property name="activates_default">True</property>
-                        <property name="width_chars">4</property>
+                        <property name="max-length">10</property>
+                        <property name="activates-default">True</property>
+                        <property name="width-chars">4</property>
+                        <property name="truncate-multiline">True</property>
                         <accessibility>
                           <relation type="labelled-by" target="character"/>
                         </accessibility>
-                        <property name="truncate-multiline">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" 
id="characterentry-atkobject">
                             <property name="AtkObject::accessible-name" 
translatable="yes" 
context="insertfootnote|characterentry-atkobject">Character</property>
@@ -221,16 +221,16 @@
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">1</property>
-                        <property name="top_attach">1</property>
+                        <property name="left-attach">1</property>
+                        <property name="top-attach">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkButton" id="choosecharacter">
                         <property name="label" translatable="yes" 
context="insertfootnote|choosecharacter">Choose…</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">True</property>
                         <property name="halign">start</property>
                         <property name="valign">center</property>
                         <child internal-child="accessible">
@@ -240,8 +240,8 @@
                         </child>
                       </object>
                       <packing>
-                        <property name="left_attach">2</property>
-                        <property name="top_attach">1</property>
+                        <property name="left-attach">2</property>
+                        <property name="top-attach">1</property>
                       </packing>
                     </child>
                   </object>
@@ -249,7 +249,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label1">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes" 
context="insertfootnote|label1">Numbering</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
@@ -266,27 +266,27 @@
             <child>
               <object class="GtkFrame" id="frame2">
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
+                <property name="can-focus">False</property>
+                <property name="label-xalign">0</property>
+                <property name="shadow-type">none</property>
                 <child>
                   <object class="GtkBox" id="box2">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="orientation">vertical</property>
-                    <property name="spacing">6</property>
+                    <property name="can-focus">False</property>
                     <property name="margin-start">12</property>
                     <property name="margin-top">6</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
                     <child>
                       <object class="GtkRadioButton" id="footnote">
                         <property name="label" translatable="yes" 
context="insertfootnote|footnote">Footnote</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="valign">center</property>
-                        <property name="use_underline">True</property>
+                        <property name="use-underline">True</property>
                         <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="draw-indicator">True</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="footnote-atkobject">
                             <property name="AtkObject::accessible-description" 
translatable="yes" context="insertfootnote|extended_tip|footnote">Inserts a 
footnote anchor at the current cursor position in the document, and adds a 
footnote to the bottom of the page.</property>
@@ -303,11 +303,11 @@
                       <object class="GtkRadioButton" id="endnote">
                         <property name="label" translatable="yes" 
context="insertfootnote|endnote">Endnote</property>
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
+                        <property name="can-focus">True</property>
+                        <property name="receives-default">False</property>
                         <property name="valign">center</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_indicator">True</property>
+                        <property name="use-underline">True</property>
+                        <property name="draw-indicator">True</property>
                         <property name="group">footnote</property>
                         <child internal-child="accessible">
                           <object class="AtkObject" id="endnote-atkobject">
@@ -326,7 +326,7 @@
                 <child type="label">
                   <object class="GtkLabel" id="label2">
                     <property name="visible">True</property>
-                    <property name="can_focus">False</property>
+                    <property name="can-focus">False</property>
                     <property name="label" translatable="yes" 
context="insertfootnote|label2">Type</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
@@ -354,9 +354,6 @@
       <action-widget response="-6">cancel</action-widget>
       <action-widget response="-11">help</action-widget>
     </action-widgets>
-    <child type="titlebar">
-      <placeholder/>
-    </child>
     <child internal-child="accessible">
       <object class="AtkObject" id="InsertFootnoteDialog-atkobject">
         <property name="AtkObject::accessible-description" translatable="yes" 
context="insertfootnote|extended_tip|InsertFootnoteDialog">Inserts a footnote 
or an endnote in the document. The anchor for the note is inserted at the 
current cursor position.</property>

Reply via email to