[gimp] app: show the layer mode dropdown list properly.



commit 6dfca83c2a5ee8d053150e85e2047702d67eb4e7
Author: Jehan <jehan girinstud io>
Date:   Wed Dec 19 14:51:03 2018 +0100

    app: show the layer mode dropdown list properly.
    
    Showing it was only displaying the top modes, with a lot of top space,
    and you had to slowly scroll down the list. This is the same as #2642
    (as Alexandre noted in a comment), so I just use the same "fix" though I
    don't fully understand it. It feels more of a side effect of
    gtk_combo_box_set_wrap_width() working around a bug of GtkComboBox. So
    if anyone has a better fix and understand the issue, feel free to patch
    (maybe GTK+ directly?). In the meantime, it works well enough. :-)

 app/widgets/gimplayermodecombobox.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/app/widgets/gimplayermodecombobox.c b/app/widgets/gimplayermodecombobox.c
index 2062486d19..6583ea78fe 100644
--- a/app/widgets/gimplayermodecombobox.c
+++ b/app/widgets/gimplayermodecombobox.c
@@ -143,6 +143,10 @@ gimp_layer_mode_combo_box_constructed (GObject *object)
 
   gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo),
                                  combo->priv->layer_mode);
+  /* Sure why this is needed to have the dropdown display properly.
+   * Probably some weird side effect. See issue #2642.
+   */
+  gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (combo), 1);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]