[gimp] app: fix rectangle-select tool rounded-corners option
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix rectangle-select tool rounded-corners option
- Date: Mon, 21 Jan 2019 16:40:01 +0000 (UTC)
commit a4726960126fa6a6ab887abd79d8de96bc02525c
Author: Ell <ell_se yahoo com>
Date: Mon Jan 21 11:36:22 2019 -0500
app: fix rectangle-select tool rounded-corners option
In GimpToolRectangle, fix the type of the cornder_radius field, so
that non-integer radii are properly displayed.
In GimpRectangleSelectOptions and GimpToolRectangle, increase the
maximal corner radius.
app/display/gimptoolrectangle.c | 4 ++--
app/tools/gimprectangleselectoptions.c | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimptoolrectangle.c b/app/display/gimptoolrectangle.c
index 97c5d058f7..3cecea008d 100644
--- a/app/display/gimptoolrectangle.c
+++ b/app/display/gimptoolrectangle.c
@@ -222,7 +222,7 @@ struct _GimpToolRectanglePrivate
/* Whether to draw round corners */
gboolean round_corners;
- gboolean corner_radius;
+ gdouble corner_radius;
/* The title for the statusbar coords */
gchar *status_title;
@@ -556,7 +556,7 @@ gimp_tool_rectangle_class_init (GimpToolRectangleClass *klass)
g_object_class_install_property (object_class, PROP_CORNER_RADIUS,
g_param_spec_double ("corner-radius",
NULL, NULL,
- 0.0, 1000.0, 5.0,
+ 0.0, 10000.0, 10.0,
GIMP_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
diff --git a/app/tools/gimprectangleselectoptions.c b/app/tools/gimprectangleselectoptions.c
index cdb88b415f..ea8f0dae97 100644
--- a/app/tools/gimprectangleselectoptions.c
+++ b/app/tools/gimprectangleselectoptions.c
@@ -28,6 +28,7 @@
#include "core/gimptoolinfo.h"
#include "widgets/gimppropwidgets.h"
+#include "widgets/gimpspinscale.h"
#include "gimprectangleoptions.h"
#include "gimprectangleselectoptions.h"
@@ -99,7 +100,7 @@ gimp_rectangle_select_options_class_init (GimpRectangleSelectOptionsClass *klass
"corner-radius",
_("Radius"),
_("Radius of rounding in pixels"),
- 0.0, 100.0, 5.0,
+ 0.0, 10000.0, 10.0,
GIMP_PARAM_STATIC_STRINGS);
gimp_rectangle_options_install_properties (object_class);
@@ -173,6 +174,9 @@ gimp_rectangle_select_options_gui (GimpToolOptions *tool_options)
scale = gimp_prop_spin_scale_new (config, "corner-radius", NULL,
1.0, 10.0, 1);
+ gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale),
+ 0.0, 1000.0);
+ gimp_spin_scale_set_gamma (GIMP_SPIN_SCALE (scale), 1.7);
frame = gimp_prop_expanding_frame_new (config, "round-corners", NULL,
scale, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]