diff --git a/app/operations/gimplevelsconfig.c b/app/operations/gimplevelsconfig.c index d88f358999..d1783d2091 100644 --- a/app/operations/gimplevelsconfig.c +++ b/app/operations/gimplevelsconfig.c @@ -106,6 +106,11 @@ gimp_levels_config_class_init (GimpLevelsConfigClass *klass) viewable_class->default_icon_name = "gimp-tool-levels"; + /* "trc" should default to GIMP_TRC_PERCEPTUAL (cf. #15962). + * We cannot change it until we implement GEGL op versioning. + * In GIMP 3.0, calling this op from the public API was always run in + * linear (#15681). + */ GIMP_CONFIG_PROP_ENUM (object_class, PROP_TRC, "trc", _("Tone Reproduction Curve"), diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c index a1185c11fb..4dd861bb2d 100644 --- a/app/tools/gimplevelstool.c +++ b/app/tools/gimplevelstool.c @@ -407,6 +407,13 @@ gimp_levels_tool_dialog (GimpFilterTool *filter_tool) gtk_box_pack_end (GTK_BOX (hbox), hbox2, FALSE, FALSE, 0); /* The linear/perceptual radio buttons */ + /* XXX: override the default to Perceptual for the time being, until + * we are able to change "gimp:levels" default for "trc" directly. + * See #15962. + */ + g_object_set (config, + "trc", GIMP_TRC_PERCEPTUAL, + NULL); hbox2 = gimp_prop_enum_icon_box_new (G_OBJECT (config), "trc", "gimp-color-space", -1, -1); @@ -668,6 +675,12 @@ gimp_levels_tool_reset (GimpFilterTool *filter_tool) g_object_set (filter_tool->config, "channel", channel, NULL); + /* XXX: the tool defaults to Perceptual, unlike the op. + * See #15962. + */ + g_object_set (filter_tool->config, + "trc", GIMP_TRC_PERCEPTUAL, + NULL); } static void