[Libreoffice-commits] core.git: vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 17 13:00:42 UTC 2021


 vcl/unx/gtk3/gtkinst.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 41ef183bbfcf569eb5995c5436edca3d00050385
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jun 17 11:41:20 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jun 17 14:59:45 2021 +0200

    gtk4: reorder the cell renderers in the comboboxes
    
    as used in format, character for the the tickboxes for spellchecking
    support
    
    Change-Id: I7b7b60455beb0f262b2e4c40286dcaec26eb42dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117375
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index e093c127198f..ea35624e49c4 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -17053,7 +17053,6 @@ private:
     GtkWidget* m_pMenuWindow;
     GtkTreeModel* m_pTreeModel;
 //    GtkCellRenderer* m_pButtonTextRenderer;
-//    GtkCellRenderer* m_pMenuTextRenderer;
     GtkWidget* m_pEntry;
     GtkEditable* m_pEditable;
 //    GtkCellView* m_pCellView;
@@ -18123,6 +18122,16 @@ public:
         }
         SAL_WARN_IF(!m_pMenuWindow, "vcl.gtk", "GtkInstanceComboBox: couldn't find popup menu");
 
+        GtkCellLayout* pCellLayout = GTK_CELL_LAYOUT(m_pComboBox);
+        GList* cells = gtk_cell_layout_get_cells(pCellLayout);
+        guint i = g_list_length(cells) - 1;;
+        // reorder the cell renderers
+        for (GList* pRenderer = g_list_first(cells); pRenderer; pRenderer = g_list_next(pRenderer))
+        {
+            GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
+            gtk_cell_layout_reorder(pCellLayout, pCellRenderer, i--);
+        }
+
         if (gtk_combo_box_get_has_entry(m_pComboBox))
         {
             m_bAutoComplete = true;


More information about the Libreoffice-commits mailing list