pdb: Updating the parameter range for brightness

(cherry picked from commit fc5dfa1f75)
This commit is contained in:
Nikc 2022-03-26 20:11:49 +00:00 committed by Jehan
parent ed2d1244da
commit 1de60726f4
3 changed files with 7 additions and 7 deletions

View File

@ -740,7 +740,7 @@ register_drawable_color_procs (GimpPDB *pdb)
"gimp-drawable-brightness-contrast"); "gimp-drawable-brightness-contrast");
gimp_procedure_set_static_help (procedure, gimp_procedure_set_static_help (procedure,
"Modify brightness/contrast in the specified drawable.", "Modify brightness/contrast in the specified drawable.",
"This procedures allows the brightness and contrast of the specified drawable to be modified. Both 'brightness' and 'contrast' parameters are defined between -0.5 and 0.5.", "This procedures allows the brightness and contrast of the specified drawable to be modified. Both 'brightness' and 'contrast' parameters are defined between -1.0 and 1.0.",
NULL); NULL);
gimp_procedure_set_static_attribution (procedure, gimp_procedure_set_static_attribution (procedure,
"Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis",
@ -756,13 +756,13 @@ register_drawable_color_procs (GimpPDB *pdb)
g_param_spec_double ("brightness", g_param_spec_double ("brightness",
"brightness", "brightness",
"Brightness adjustment", "Brightness adjustment",
-0.5, 0.5, -0.5, -1.0, 1.0, -1.0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_procedure_add_argument (procedure, gimp_procedure_add_argument (procedure,
g_param_spec_double ("contrast", g_param_spec_double ("contrast",
"contrast", "contrast",
"Contrast adjustment", "Contrast adjustment",
-0.5, 0.5, -0.5, -1.0, 1.0, -1.0,
GIMP_PARAM_READWRITE)); GIMP_PARAM_READWRITE));
gimp_pdb_register_procedure (pdb, procedure); gimp_pdb_register_procedure (pdb, procedure);
g_object_unref (procedure); g_object_unref (procedure);

View File

@ -47,7 +47,7 @@
* *
* This procedures allows the brightness and contrast of the specified * This procedures allows the brightness and contrast of the specified
* drawable to be modified. Both 'brightness' and 'contrast' parameters * drawable to be modified. Both 'brightness' and 'contrast' parameters
* are defined between -0.5 and 0.5. * are defined between -1.0 and 1.0.
* *
* Returns: TRUE on success. * Returns: TRUE on success.
* *

View File

@ -22,7 +22,7 @@ sub drawable_brightness_contrast {
$help = <<'HELP'; $help = <<'HELP';
This procedures allows the brightness and contrast of the specified drawable to This procedures allows the brightness and contrast of the specified drawable to
be modified. Both 'brightness' and 'contrast' parameters are defined between be modified. Both 'brightness' and 'contrast' parameters are defined between
-0.5 and 0.5. -1.0 and 1.0.
HELP HELP
&std_pdb_misc; &std_pdb_misc;
@ -32,9 +32,9 @@ HELP
@inargs = ( @inargs = (
{ name => 'drawable', type => 'drawable', { name => 'drawable', type => 'drawable',
desc => 'The drawable' }, desc => 'The drawable' },
{ name => 'brightness', type => '-0.5 <= float <= 0.5', { name => 'brightness', type => '-1.0 <= float <= 1.0',
desc => 'Brightness adjustment' }, desc => 'Brightness adjustment' },
{ name => 'contrast', type => '-0.5 <= float <= 0.5', { name => 'contrast', type => '-1.0 <= float <= 1.0',
desc => 'Contrast adjustment' } desc => 'Contrast adjustment' }
); );