[gimp/soc-2012-unified-transformation: 8/51] transformtool: Try to straighten out modifiers
- From: Mikael Magnusson <mikachu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2012-unified-transformation: 8/51] transformtool: Try to straighten out modifiers
- Date: Mon, 20 Aug 2012 13:51:26 +0000 (UTC)
commit 362afb122aa3321c480478fb11805494c8130d25
Author: Mikael Magnusson <mikachu src gnome org>
Date: Thu Jun 14 02:32:23 2012 +0200
transformtool: Try to straighten out modifiers
app/tools/gimptransformoptions.c | 18 +++++++++++++++---
app/tools/gimptransformtool.c | 2 +-
2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimptransformoptions.c b/app/tools/gimptransformoptions.c
index 78f2a0e..b7a2e85 100644
--- a/app/tools/gimptransformoptions.c
+++ b/app/tools/gimptransformoptions.c
@@ -368,17 +368,29 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
}
else if (tool_options->tool_info->tool_type == GIMP_TYPE_UNIFIED_TRANSFORM_TOOL)
{
- alternate = (_("Move points (%s)"));
- constrain_label = constrain_tip = (_("Keep aspect when scaling (%s)"));
+ alternate = (_("From center (%s)"));
+ constrain_label = constrain_tip = (_("Constrain/snap movement (%s)"));
}
+ /* The constrain behaviour is not what is in the spec, it would make the help labels essays */
+ /* spec:
+ * constrain move,rotate,perspective = ctrl
+ * keep aspect scale = shift
+ * from centre scale,shear = ctrl
+ * free shear = shift
+ * centre/corner rotate = ctrl
+ * real life:
+ * constrain move,rotate,perspective,scale(aspect),shear,rotation axis = ctrl
+ * from centre scale, shear = shift
+ */
+ /* TODO: should we just hardcode ctrl and shift here instead of using the not really applicably named functions? */
if (alternate)
{
GtkWidget *button;
gchar *label;
label = g_strdup_printf (alternate,
- gimp_get_mod_string (GDK_MOD1_MASK));
+ gimp_get_mod_string (gimp_get_extend_selection_mask ()));
button = gimp_prop_check_button_new (config, "alternate", label);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index e864b77..f3548e3 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -500,7 +500,7 @@ gimp_transform_tool_modifier_key (GimpTool *tool,
"constrain", ! options->constrain,
NULL);
- if (key == GDK_MOD1_MASK)
+ if (key == gimp_get_extend_selection_mask ())
g_object_set (options,
"alternate", ! options->alternate,
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]