From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc') diff --git a/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc b/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc index 284a9f2771..65b637d419 100644 --- a/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc +++ b/third_party/jpeg-xl/plugins/gimp/file-jxl-save.cc @@ -17,12 +17,12 @@ #define PLUG_IN_BINARY "file-jxl" #define SAVE_PROC "file-jxl-save" -#define SCALE_WIDTH 200 - namespace jxl { namespace { +constexpr size_t kScaleWidth = 200; + #ifndef g_clear_signal_handler // g_clear_signal_handler was added in glib 2.62 void g_clear_signal_handler(gulong* handler, gpointer instance) { @@ -292,7 +292,7 @@ bool JpegXlSaveGui::SaveDialog() { "\n\td\u00A0=\u00A06\tPoor"; entry_distance = reinterpret_cast( - gimp_scale_entry_new(GTK_TABLE(table), 0, 0, "Distance", SCALE_WIDTH, 0, + gimp_scale_entry_new(GTK_TABLE(table), 0, 0, "Distance", kScaleWidth, 0, jxl_save_opts.distance, 0.0, 15.0, 0.001, 1.0, 3, true, 0.0, 0.0, distance_help, SAVE_PROC)); gimp_scale_entry_set_logarithmic(reinterpret_cast(entry_distance), @@ -303,7 +303,7 @@ bool JpegXlSaveGui::SaveDialog() { "JPEG-style Quality is remapped to distance. " "Values roughly match libjpeg quality settings."; entry_quality = reinterpret_cast(gimp_scale_entry_new( - GTK_TABLE(table), 0, 1, "Quality", SCALE_WIDTH, 0, jxl_save_opts.quality, + GTK_TABLE(table), 0, 1, "Quality", kScaleWidth, 0, jxl_save_opts.quality, 8.26, 100.0, 1.0, 10.0, 2, true, 0.0, 0.0, quality_help, SAVE_PROC)); // Distance and Quality Signals @@ -325,7 +325,7 @@ bool JpegXlSaveGui::SaveDialog() { "As\u00A0a\u00A0result, image quality may be decreased. " "Default\u00A0=\u00A03."; entry_effort = reinterpret_cast( - gimp_scale_entry_new(GTK_TABLE(table), 0, 3, "Speed", SCALE_WIDTH, 0, + gimp_scale_entry_new(GTK_TABLE(table), 0, 3, "Speed", kScaleWidth, 0, 10 - jxl_save_opts.encoding_effort, 1, 9, 1, 2, 0, true, 0.0, 0.0, effort_help, SAVE_PROC)); @@ -419,7 +419,7 @@ bool JpegXlSaveGui::SaveDialog() { entry_faster = reinterpret_cast( gimp_scale_entry_new(GTK_TABLE(table), 0, 0, "Faster Decoding", - SCALE_WIDTH, 0, jxl_save_opts.faster_decoding, 0, 4, + kScaleWidth, 0, jxl_save_opts.faster_decoding, 0, 4, 1, 1, 0, true, 0.0, 0.0, faster_help, SAVE_PROC)); // Faster Decoding Signals -- cgit v1.2.3