app, menus: delete "layers-vector-fill-stroke" action.

Cf. discussions on IRC with Alx.
Since this is editable directly in the Path tool options, we likely
don't need to have the separate action for it. It feels redundant.

It is still available on a double-click, though I am not sure if it's a
good idea. Maybe the double-click should rather activate the path tool,
from which you can edit all these (just as what happens with the text
tool). To be continued after more UX discussions?
This commit is contained in:
Jehan 2025-10-15 15:07:30 +02:00
parent 0f65d3923e
commit e960ed0d12
4 changed files with 36 additions and 45 deletions

View file

@ -206,12 +206,6 @@ static const GimpActionEntry layers_actions[] =
layers_text_along_path_cmd_callback,
GIMP_HELP_LAYER_TEXT_ALONG_PATH },
{ "layers-vector-fill-stroke", NULL,
NC_("layers-action", "Fill / Stroke..."), NULL, { NULL },
NC_("layers-action", "Edit the fill and stroke of this vector layer"),
layers_vector_fill_stroke_cmd_callback,
GIMP_HELP_LAYER_VECTOR_FILL_STROKE },
{ "layers-resize", GIMP_ICON_OBJECT_RESIZE,
NC_("layers-action", "Layer B_oundary Size..."), NULL, { NULL },
NC_("layers-action", "Adjust the layer dimensions"),
@ -1073,8 +1067,6 @@ layers_actions_update (GimpActionGroup *group,
SET_VISIBLE ("layers-text-to-path", n_text_layers > 0 && !ac);
SET_VISIBLE ("layers-text-along-path", text_layer && !ac);
SET_VISIBLE ("layers-vector-fill-stroke", vector_layer && !ac);
SET_SENSITIVE ("layers-resize", n_selected_layers == 1 && all_writable && all_movable && !ac);
SET_SENSITIVE ("layers-resize-to-image", all_writable && all_movable && !ac);
SET_SENSITIVE ("layers-scale", n_selected_layers == 1 && all_writable && all_movable && !ac);

View file

@ -183,6 +183,10 @@ static gint layers_mode_index (GimpLayerMode layer_mode
const GimpLayerMode *modes,
gint n_modes);
static void layers_vector_show_fill_stroke (GimpAction *action,
GVariant *value,
gpointer data);
/* private variables */
@ -213,7 +217,7 @@ layers_edit_cmd_callback (GimpAction *action,
}
else if (gimp_item_is_vector_layer (GIMP_ITEM (layers->data)))
{
layers_vector_fill_stroke_cmd_callback (action, value, data);
layers_vector_show_fill_stroke (action, value, data);
}
else
{
@ -2693,37 +2697,6 @@ layers_scale_callback (GtkWidget *dialog,
}
}
void
layers_vector_fill_stroke_cmd_callback (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpLayer *layer;
GList *layers;
GtkWidget *widget;
return_if_no_layers (image, layers, data);
return_if_no_widget (widget, data);
if (g_list_length (layers) != 1)
return;
layer = layers->data;
if (GIMP_IS_VECTOR_LAYER (layer))
{
GtkWidget *dialog;
dialog = vector_layer_options_dialog_new (GIMP_VECTOR_LAYER (layer),
action_data_get_context (data),
_("Fill / Stroke"),
"gimp-vector-layer-stroke",
GIMP_HELP_LAYER_VECTOR_FILL_STROKE,
widget);
gtk_widget_show (dialog);
}
}
static void
layers_resize_callback (GtkWidget *dialog,
GimpViewable *viewable,
@ -2782,3 +2755,34 @@ layers_mode_index (GimpLayerMode layer_mode,
return i;
}
static void
layers_vector_show_fill_stroke (GimpAction *action,
GVariant *value,
gpointer data)
{
GimpImage *image;
GimpLayer *layer;
GList *layers;
GtkWidget *widget;
return_if_no_layers (image, layers, data);
return_if_no_widget (widget, data);
if (g_list_length (layers) != 1)
return;
layer = layers->data;
if (GIMP_IS_VECTOR_LAYER (layer))
{
GtkWidget *dialog;
dialog = vector_layer_options_dialog_new (GIMP_VECTOR_LAYER (layer),
action_data_get_context (data),
_("Fill / Stroke"),
"gimp-vector-layer-stroke",
GIMP_HELP_LAYER_VECTOR_FILL_STROKE,
widget);
gtk_widget_show (dialog);
}
}

View file

@ -435,9 +435,6 @@
<item><attribute name="action">app.layers-text-to-path</attribute></item>
<item><attribute name="action">app.layers-text-along-path</attribute></item>
<!-- Vector Layers -->
<item><attribute name="action">app.layers-vector-fill-stroke</attribute></item>
<!-- Action shared to text, vector and link layers -->
<item><attribute name="action">app.layers-rasterize</attribute></item>
<item><attribute name="action">app.layers-revert-rasterize</attribute></item>

View file

@ -63,8 +63,6 @@
<item><attribute name="action">app.layers-text-to-path</attribute></item>
<item><attribute name="action">app.layers-text-along-path</attribute></item>
<item><attribute name="action">app.layers-vector-fill-stroke</attribute></item>
<item><attribute name="action">app.layers-rasterize</attribute></item>
<item><attribute name="action">app.layers-revert-rasterize</attribute></item>
</section>