[graphics/krita] plugins/paintops/libpaintop: [string freeze exception] Fix range of Saturation and Value brush options

Dmitry Kazakov null at kde.org
Tue Oct 22 13:58:14 BST 2024


Git commit da166935de2c68b0ae6ae79b92c9c17c31ba7420 by Dmitry Kazakov.
Committed on 22/10/2024 at 12:58.
Pushed by dkazakov into branch 'master'.

[string freeze exception] Fix range of Saturation and Value brush options

The patch fixes the label in the curve widget that shows the range of
Value and Saturation options. The patch implements two changes:

1) Fix scaling of the curve points from 0...100 to -100...100 as written
   in the labels

2) Fix the label that (incorrectly) tells that 50% is the "neutral" value.
   The actual "neutral" value is 0%.

BUG:487469
CC:kimageshop at kde.org
CC:kde-i18n-doc at kde.org

M  +8    -6    plugins/paintops/libpaintop/KisStandardOptionData.cpp

https://invent.kde.org/graphics/krita/-/commit/da166935de2c68b0ae6ae79b92c9c17c31ba7420

diff --git a/plugins/paintops/libpaintop/KisStandardOptionData.cpp b/plugins/paintops/libpaintop/KisStandardOptionData.cpp
index cf5bddfd965..ec2c6aaaa14 100644
--- a/plugins/paintops/libpaintop/KisStandardOptionData.cpp
+++ b/plugins/paintops/libpaintop/KisStandardOptionData.cpp
@@ -101,7 +101,7 @@ QString hueMaxLabel()
 QString saturationMinLabel()
 {
     // xgettext: no-c-format
-    QString activeColorMsg = i18n("(50% is active color)");
+    QString activeColorMsg = i18n("(0% is active color)");
     QString br("<br />");
     QString fullPercent = i18n("+100%");
     QString zeroPercent = i18n("-100%");
@@ -113,7 +113,7 @@ QString saturationMinLabel()
 QString saturationMaxLabel()
 {
     // xgettext: no-c-format
-    QString activeColorMsg = i18n("(50% is active color)");
+    QString activeColorMsg = i18n("(0% is active color)");
     QString br("<br />");
     QString fullPercent = i18n("+100%");
     QString zeroPercent = i18n("-100%");
@@ -124,7 +124,7 @@ QString saturationMaxLabel()
 QString valueMinLabel()
 {
     // xgettext: no-c-format
-    QString activeColorMsg = i18n("(50% is active color)");
+    QString activeColorMsg = i18n("(0% is active color)");
     QString br("<br />");
     QString fullPercent = i18n("+100%");
     QString zeroPercent = i18n("-100%");
@@ -136,7 +136,7 @@ QString valueMinLabel()
 QString valueMaxLabel()
 {
     // xgettext: no-c-format
-    QString activeColorMsg = i18n("(50% is active color)");
+    QString activeColorMsg = i18n("(0% is active color)");
     QString br("<br />");
     QString fullPercent = i18n("+100%");
     QString zeroPercent = i18n("-100%");
@@ -159,7 +159,8 @@ KisCurveOptionWidget *createSaturationOptionWidget()
 {
     return createCurveOptionWidget(KisSaturationOptionData(), KisPaintOpOption::COLOR,
                                    detail::saturationMinLabel(),
-                                   detail::saturationMaxLabel());
+                                   detail::saturationMaxLabel(),
+                                   -100, 100, i18n("%"));
 }
 
 KisCurveOptionWidget *createValueOptionWidget()
@@ -167,7 +168,8 @@ KisCurveOptionWidget *createValueOptionWidget()
     return createCurveOptionWidget(KisValueOptionData(),
                                    KisPaintOpOption::COLOR,
                                    detail::valueMinLabel(),
-                                   detail::valueMaxLabel());
+                                   detail::valueMaxLabel(),
+                                   -100, 100, i18n("%"));
 }
 
 KisCurveOptionWidget *createRateOptionWidget()


More information about the kimageshop mailing list