cui/uiconfig/ui/querysetinsmodedialog.ui |   35 +++++++++++++++----------------
 vcl/qt5/QtInstanceBuilder.cxx            |    1 
 vcl/qt5/QtInstanceImage.cxx              |    4 +--
 3 files changed, 21 insertions(+), 19 deletions(-)

New commits:
commit ec9da7217906f92169edf708a4ec36bac8b88e31
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Oct 29 15:28:29 2024 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Oct 29 19:02:06 2024 +0100

    tdf#130857 qt weld: Declare support for "Switch to override" dialog
    
    Add .ui file of the "You are switching to the overwrite mode"
    dialog that gets shown when pressing the Insert key in Writer
    to list of files supported by QtInstanceBuilder, so that native
    Qt widgets are used for that dialog now when using the qt5/qt6 VCL
    plugins, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS=1
    is set.
    
    Change-Id: Ib4f83af6d83e46a5bf1a816ffe7d1d494bc0b9d3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175792
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx
index 259564e78fb3..86189c951e73 100644
--- a/vcl/qt5/QtInstanceBuilder.cxx
+++ b/vcl/qt5/QtInstanceBuilder.cxx
@@ -43,6 +43,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& 
rUIFile)
     static std::unordered_set<OUString> aSupportedUIFiles = {
         u"cui/ui/aboutdialog.ui"_ustr,
         u"cui/ui/optnewdictionarydialog.ui"_ustr,
+        u"cui/ui/querysetinsmodedialog.ui"_ustr,
         u"modules/scalc/ui/inputstringdialog.ui"_ustr,
         u"modules/schart/ui/insertaxisdlg.ui"_ustr,
         u"modules/smath/ui/alignmentdialog.ui"_ustr,
commit 8f52ba46133a000024ea58425d6a4f2671b1efda
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Oct 29 15:22:12 2024 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Oct 29 19:02:00 2024 +0100

    tdf#130857 cui: Move checkbox out of button box
    
    In the "You are switching to the overwrite mode" dialog
    that gets shown when pressing the Insert key in Writer,
    move the "Do not show again" checkbox above the button
    box with the "No" and "Yes" buttons instead of having
    it inside of the button box.
    
    This aligns this with how it's done elsewhere, e.g. in
    the "LibreOfficeDev Help Not Installed" dialog
    (sfx2/uiconfig/ui/helpmanual.ui) that gets shown
    when pressing F1 without local help installed.
    
    It also prevents an issue with this case of a checkbox
    with quite some text inside a button box resulting in
    overlapping UI elements for the native Qt version
    of the dialog (once this gets enabled in
    QtInstanceBuilder::IsUIFileSupported).
    
    Change-Id: I005da330cca5a8d6ee468477472e0382c288b022
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175791
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/cui/uiconfig/ui/querysetinsmodedialog.ui 
b/cui/uiconfig/ui/querysetinsmodedialog.ui
index 761111162dc2..89b62be01eb2 100644
--- a/cui/uiconfig/ui/querysetinsmodedialog.ui
+++ b/cui/uiconfig/ui/querysetinsmodedialog.ui
@@ -21,22 +21,6 @@
             <property name="margin-top">12</property>
             <property name="hexpand">True</property>
             <property name="layout-style">end</property>
-            <child>
-              <object class="GtkCheckButton" id="cbDontShowAgain">
-                <property name="label" translatable="yes" 
context="SetInsModeDialog|Checkbox">Do not show again</property>
-                <property name="visible">True</property>
-                <property name="can-focus">True</property>
-                <property name="receives-default">False</property>
-                <property name="hexpand">True</property>
-                <property name="draw-indicator">True</property>
-              </object>
-              <packing>
-                <property name="expand">True</property>
-                <property name="fill">True</property>
-                <property name="position">0</property>
-                <property name="secondary">True</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkButton" id="btnNo">
                 <property name="label" translatable="yes" 
context="SetInsModeDialog|Button_No">No</property>
@@ -72,7 +56,7 @@
           </packing>
         </child>
         <child>
-          <!-- n-columns=2 n-rows=3 -->
+          <!-- n-columns=2 n-rows=4 -->
           <object class="GtkGrid">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
@@ -136,6 +120,23 @@
                 <property name="height">2</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkCheckButton" id="cbDontShowAgain">
+                <property name="label" translatable="yes" 
context="SetInsModeDialog|Checkbox">Do not show again</property>
+                <property name="visible">True</property>
+                <property name="can-focus">True</property>
+                <property name="receives-default">False</property>
+                <property name="hexpand">True</property>
+                <property name="draw-indicator">True</property>
+              </object>
+              <packing>
+                <property name="left-attach">1</property>
+                <property name="top-attach">3</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
             <child>
               <placeholder/>
             </child>
commit a03853f2e62a7dd98e992cc8833285c3c835ed09
Author:     Michael Weghorn <[email protected]>
AuthorDate: Tue Oct 29 14:48:47 2024 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Tue Oct 29 19:01:54 2024 +0100

    tdf#130857 qt weld: Implement QtInstanceImage::set_from_icon_name
    
    This will get used e.g. by the "You are switching to the
    overwrite mode" dialog that gets shown when pressing the
    Insert key in Writer.
    
    Change-Id: Icea593ad65d643b647408c29482d64b9084d4cd3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175790
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/vcl/qt5/QtInstanceImage.cxx b/vcl/qt5/QtInstanceImage.cxx
index ce63b3b03e50..7b39fb04c18a 100644
--- a/vcl/qt5/QtInstanceImage.cxx
+++ b/vcl/qt5/QtInstanceImage.cxx
@@ -18,9 +18,9 @@ QtInstanceImage::QtInstanceImage(QLabel* pLabel)
     assert(m_pLabel);
 }
 
-void QtInstanceImage::set_from_icon_name(const OUString&)
+void QtInstanceImage::set_from_icon_name(const OUString& rIconName)
 {
-    assert(false && "Not implemented yet");
+    m_pLabel->setPixmap(loadQPixmapIcon(rIconName));
 }
 
 void QtInstanceImage::set_image(VirtualDevice*) { assert(false && "Not 
implemented yet"); }

Reply via email to