core: Use MAX_CHANNELS for Histogram limit

gimphistogram.c used its own custom MAX_N_COMPONENTS
define for the max value of its "n-components" property.
Since this value is the same as MAX_CHANNELS, it would be
good to use the global constant so the histogram limit automatically
updates when we added a new format with a larger number of components
such as CMYKA.
This commit is contained in:
Alx Sa 2026-03-31 19:28:05 +00:00
parent 657dceb3ed
commit 127510cd81

View file

@ -44,7 +44,6 @@
#include "gimpwaitable.h"
#define MAX_N_COMPONENTS 4
#define N_DERIVED_CHANNELS 2
#define PIXELS_PER_THREAD \
@ -146,7 +145,7 @@ gimp_histogram_class_init (GimpHistogramClass *klass)
g_object_class_install_property (object_class, PROP_N_COMPONENTS,
g_param_spec_int ("n-components", NULL, NULL,
0, MAX_N_COMPONENTS, 0,
0, MAX_CHANNELS, 0,
GIMP_PARAM_READABLE));
g_object_class_install_property (object_class, PROP_N_BINS,