[Bf-blender-cvs] [8799ab201d3] blender-v3.4-release: Fix T96481: make color picker RGB display consistent

Hallam Roberts noreply at git.blender.org
Fri Nov 11 18:23:32 CET 2022


Commit: 8799ab201d332ff2fe1a52815b595152639fdcb7
Author: Hallam Roberts
Date:   Fri Nov 11 15:50:35 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB8799ab201d332ff2fe1a52815b595152639fdcb7

Fix T96481: make color picker RGB display consistent

Show RGB value "1.000" instead of "1", jus like HSV mode. Also uses full labels
"Red", "Green" and "Blue" rather than the shortened labels "R", "G" and "B",
for both RGB and HSV.

Differential Revision: https://developer.blender.org/D14387

===================================================================

M	source/blender/editors/interface/interface_region_color_picker.cc

===================================================================

diff --git a/source/blender/editors/interface/interface_region_color_picker.cc b/source/blender/editors/interface/interface_region_color_picker.cc
index 0b2c538331a..8b28e9fece1 100644
--- a/source/blender/editors/interface/interface_region_color_picker.cc
+++ b/source/blender/editors/interface/interface_region_color_picker.cc
@@ -199,7 +199,7 @@ static void ui_update_color_picker_buts_rgb(uiBut *from_but,
        * push, so disable it on RNA buttons in the color picker block */
       UI_but_flag_disable(bt, UI_BUT_UNDO);
     }
-    else if (STREQ(bt->str, "Hex: ")) {
+    else if (STREQ(bt->str, "Hex:")) {
       float rgb_hex[3];
       uchar rgb_hex_uchar[3];
       char col[16];
@@ -613,7 +613,7 @@ static void ui_block_colorpicker(uiBlock *block,
   bt = uiDefButR_prop(block,
                       UI_BTYPE_NUM_SLIDER,
                       0,
-                      IFACE_("R:"),
+                      IFACE_("Red:"),
                       0,
                       yco,
                       butwidth,
@@ -623,7 +623,7 @@ static void ui_block_colorpicker(uiBlock *block,
                       0,
                       0.0,
                       0.0,
-                      0,
+                      10,
                       3,
                       TIP_("Red"));
   UI_but_func_set(bt, ui_colorpicker_rgba_update_cb, bt, nullptr);
@@ -631,7 +631,7 @@ static void ui_block_colorpicker(uiBlock *block,
   bt = uiDefButR_prop(block,
                       UI_BTYPE_NUM_SLIDER,
                       0,
-                      IFACE_("G:"),
+                      IFACE_("Green:"),
                       0,
                       yco -= UI_UNIT_Y,
                       butwidth,
@@ -641,7 +641,7 @@ static void ui_block_colorpicker(uiBlock *block,
                       1,
                       0.0,
                       0.0,
-                      0,
+                      10,
                       3,
                       TIP_("Green"));
   UI_but_func_set(bt, ui_colorpicker_rgba_update_cb, bt, nullptr);
@@ -649,7 +649,7 @@ static void ui_block_colorpicker(uiBlock *block,
   bt = uiDefButR_prop(block,
                       UI_BTYPE_NUM_SLIDER,
                       0,
-                      IFACE_("B:"),
+                      IFACE_("Blue:"),
                       0,
                       yco -= UI_UNIT_Y,
                       butwidth,
@@ -659,7 +659,7 @@ static void ui_block_colorpicker(uiBlock *block,
                       2,
                       0.0,
                       0.0,
-                      0,
+                      10,
                       3,
                       TIP_("Blue"));
   UI_but_func_set(bt, ui_colorpicker_rgba_update_cb, bt, nullptr);
@@ -675,7 +675,7 @@ static void ui_block_colorpicker(uiBlock *block,
   bt = uiDefButF(block,
                  UI_BTYPE_NUM_SLIDER,
                  0,
-                 IFACE_("H:"),
+                 IFACE_("Hue:"),
                  0,
                  yco,
                  butwidth,
@@ -692,7 +692,7 @@ static void ui_block_colorpicker(uiBlock *block,
   bt = uiDefButF(block,
                  UI_BTYPE_NUM_SLIDER,
                  0,
-                 IFACE_("S:"),
+                 IFACE_("Saturation:"),
                  0,
                  yco -= UI_UNIT_Y,
                  butwidth,
@@ -710,7 +710,7 @@ static void ui_block_colorpicker(uiBlock *block,
     bt = uiDefButF(block,
                    UI_BTYPE_NUM_SLIDER,
                    0,
-                   IFACE_("L:"),
+                   IFACE_("Lightness:"),
                    0,
                    yco -= UI_UNIT_Y,
                    butwidth,
@@ -726,7 +726,7 @@ static void ui_block_colorpicker(uiBlock *block,
     bt = uiDefButF(block,
                    UI_BTYPE_NUM_SLIDER,
                    0,
-                   IFACE_("V:"),
+                   IFACE_("Value:"),
                    0,
                    yco -= UI_UNIT_Y,
                    butwidth,
@@ -750,7 +750,7 @@ static void ui_block_colorpicker(uiBlock *block,
     bt = uiDefButR_prop(block,
                         UI_BTYPE_NUM_SLIDER,
                         0,
-                        IFACE_("A: "),
+                        IFACE_("Alpha:"),
                         0,
                         yco -= UI_UNIT_Y,
                         butwidth,
@@ -760,7 +760,7 @@ static void ui_block_colorpicker(uiBlock *block,
                         3,
                         0.0,
                         0.0,
-                        0,
+                        10,
                         3,
                         TIP_("Alpha"));
     UI_but_func_set(bt, ui_colorpicker_rgba_update_cb, bt, nullptr);
@@ -788,7 +788,7 @@ static void ui_block_colorpicker(uiBlock *block,
   bt = uiDefBut(block,
                 UI_BTYPE_TEXT,
                 0,
-                IFACE_("Hex: "),
+                IFACE_("Hex:"),
                 0,
                 yco,
                 butwidth,



More information about the Bf-blender-cvs mailing list