app: consolidate UI for merging down and anchoring layers (issue #1184)
As they are both mutually exclusive and serve an almost identical purpose, the "Merge down" and "Anchor Layer" are given mutually exclusive visibility in menus, and the anchor button is replaced with a merge down button in the Layers dockable whenever there is no active floating selection
This commit is contained in:
@ -937,7 +937,8 @@ layers_actions_update (GimpActionGroup *group,
|
||||
SET_SENSITIVE ("layers-lower", layer && !fs && !ac && next);
|
||||
SET_SENSITIVE ("layers-lower-to-bottom", layer && !fs && !ac && next);
|
||||
|
||||
SET_SENSITIVE ("layers-anchor", layer && fs && !ac);
|
||||
SET_VISIBLE ("layers-anchor", layer && fs && !ac);
|
||||
SET_VISIBLE ("layers-merge-down", !fs);
|
||||
SET_SENSITIVE ("layers-merge-down", layer && !fs && !ac && visible && next_visible);
|
||||
SET_VISIBLE ("layers-merge-group", children);
|
||||
SET_SENSITIVE ("layers-merge-group", layer && !fs && !ac && children);
|
||||
|
@ -388,6 +388,14 @@ gimp_layer_tree_view_constructed (GObject *object)
|
||||
gtk_box_reorder_child (gimp_editor_get_button_box (GIMP_EDITOR (layer_view)),
|
||||
button, 5);
|
||||
|
||||
button = gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
|
||||
"layers-merge-down", NULL);
|
||||
gimp_container_view_enable_dnd (GIMP_CONTAINER_VIEW (layer_view),
|
||||
GTK_BUTTON (button),
|
||||
GIMP_TYPE_LAYER);
|
||||
gtk_box_reorder_child (gimp_editor_get_button_box (GIMP_EDITOR (layer_view)),
|
||||
button, 6);
|
||||
|
||||
button = gimp_editor_add_action_button (GIMP_EDITOR (layer_view), "layers",
|
||||
"layers-mask-add-button",
|
||||
"layers-mask-add-last-values",
|
||||
@ -402,7 +410,7 @@ gimp_layer_tree_view_constructed (GObject *object)
|
||||
GTK_BUTTON (button),
|
||||
GIMP_TYPE_LAYER);
|
||||
gtk_box_reorder_child (gimp_editor_get_button_box (GIMP_EDITOR (layer_view)),
|
||||
button, 6);
|
||||
button, 7);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user