[gimp] app: add "Constrain handles", "Around center" options to the perspective tool
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add "Constrain handles", "Around center" options to the perspective tool
- Date: Thu, 28 Feb 2019 20:48:25 +0000 (UTC)
commit ac4b0fe9f18cb3c59d6b46f788aed849b8f9a65f
Author: Ell <ell_se yahoo com>
Date: Thu Feb 28 15:43:05 2019 -0500
app: add "Constrain handles", "Around center" options to the perspective tool
Add "Constrain handles" and "Around center" options to the
perspective-transform tool's GUI, which are similar to the
corresponding options of the unified-transform tool. Both of these
options can already be controlled using Shift and Ctrl,
respectively, through the transform-grid widget, so we might as
well provide GUI toggles for them.
app/tools/gimptransformgridoptions.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
---
diff --git a/app/tools/gimptransformgridoptions.c b/app/tools/gimptransformgridoptions.c
index 631bbe7b12..ee8dddb109 100644
--- a/app/tools/gimptransformgridoptions.c
+++ b/app/tools/gimptransformgridoptions.c
@@ -32,6 +32,7 @@
#include "widgets/gimpspinscale.h"
#include "widgets/gimpwidgets-utils.h"
+#include "gimpperspectivetool.h"
#include "gimprotatetool.h"
#include "gimpscaletool.h"
#include "gimpunifiedtransformtool.h"
@@ -472,6 +473,37 @@ gimp_transform_grid_options_gui (GimpToolOptions *tool_options)
gimp_help_set_help_data (button, _("Scale around the center point"),
NULL);
+ g_free (label);
+ }
+ else if (tool_options->tool_info->tool_type == GIMP_TYPE_PERSPECTIVE_TOOL)
+ {
+ GtkWidget *button;
+ gchar *label;
+
+ label = g_strdup_printf (_("Constrain handles (%s)"),
+ gimp_get_mod_string (extend_mask));
+
+ button = gimp_prop_check_button_new (config, "constrain-perspective", label);
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gimp_help_set_help_data (
+ button, _("Constrain handles to move along edges and diagonal (%s)"),
+ NULL);
+
+ g_free (label);
+
+ label = g_strdup_printf (_("Around center (%s)"),
+ gimp_get_mod_string (constrain_mask));
+
+ button = gimp_prop_check_button_new (config, "frompivot-perspective", label);
+ gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+ gtk_widget_show (button);
+
+ gimp_help_set_help_data (
+ button, _("Transform around the center point"),
+ NULL);
+
g_free (label);
}
else if (tool_options->tool_info->tool_type == GIMP_TYPE_UNIFIED_TRANSFORM_TOOL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]