From d83d5929ad9a3c388eea5b5c3d4db2b282daa50f Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 12 Apr 2025 12:54:59 +0000 Subject: [PATCH] tools: Standardize MyPaint Brush tool layout MyPaint Brushes have their own custom sliders for brush options, so they were displayed lower in the dockable compared to other paint tools like Pencil and Paintbrush. This patch moves them up so options are in the same place across all standard paint tools. --- app/tools/gimpmybrushoptions-gui.c | 39 ++++++++++++++++++------------ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/app/tools/gimpmybrushoptions-gui.c b/app/tools/gimpmybrushoptions-gui.c index df21b4b107..6531538676 100644 --- a/app/tools/gimpmybrushoptions-gui.c +++ b/app/tools/gimpmybrushoptions-gui.c @@ -52,11 +52,33 @@ gimp_mybrush_options_gui (GimpToolOptions *tool_options) GtkWidget *combo_box; GtkWidget *frame; + /* Since MyPaint Brushes have their own custom sliders for brush options, + * we'll need to shift them up to match the layout of other brushes */ + vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4); + gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0); + gtk_widget_set_visible (vbox2, TRUE); + gtk_box_reorder_child (GTK_BOX (vbox), vbox2, 2); + /* the brush */ button = gimp_prop_mybrush_box_new (NULL, GIMP_CONTEXT (tool_options), _("Brush"), 2, NULL, NULL); - gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0); + + /* radius */ + scale = gimp_prop_spin_scale_new (config, "radius", + 0.1, 1.0, 2); + gtk_box_pack_start (GTK_BOX (vbox2), scale, FALSE, FALSE, 0); + + /* opaque */ + scale = gimp_prop_spin_scale_new (config, "opaque", + 0.1, 1.0, 2); + gtk_box_pack_start (GTK_BOX (vbox2), scale, FALSE, FALSE, 0); + + /* hardness */ + scale = gimp_prop_spin_scale_new (config, "hardness", + 0.1, 1.0, 2); + gtk_box_pack_start (GTK_BOX (vbox2), scale, FALSE, FALSE, 0); /* erase mode */ scale = gimp_prop_check_button_new (config, "eraser", NULL); @@ -66,21 +88,6 @@ gimp_mybrush_options_gui (GimpToolOptions *tool_options) scale = gimp_prop_check_button_new (config, "no-erasing", NULL); gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0); - /* radius */ - scale = gimp_prop_spin_scale_new (config, "radius", - 0.1, 1.0, 2); - gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0); - - /* opaque */ - scale = gimp_prop_spin_scale_new (config, "opaque", - 0.1, 1.0, 2); - gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0); - - /* hardness */ - scale = gimp_prop_spin_scale_new (config, "hardness", - 0.1, 1.0, 2); - gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0); - /* Expand layer options */ vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);