Fix T51400: Pasting hex code fails
The # prefix is supported, the button didn't give enough space to paste it. D2812 by @candreacchio
This commit is contained in:
parent
dcebad773f
commit
0b5cabdca5
Notes:
blender-bot
2023-02-14 07:00:19 +01:00
Referenced by issue #51400, Colour Picker UI - Copy pasting a hex code with a # results in the wrong colour
|
@ -2440,7 +2440,7 @@ static void ui_block_colorpicker(uiBlock *block, float rgba[4], PointerRNA *ptr,
|
|||
BLI_snprintf(hexcol, sizeof(hexcol), "%02X%02X%02X", UNPACK3_EX((unsigned int), rgb_gamma_uchar, ));
|
||||
|
||||
yco = -3.0f * UI_UNIT_Y;
|
||||
bt = uiDefBut(block, UI_BTYPE_TEXT, 0, IFACE_("Hex: "), 0, yco, butwidth, UI_UNIT_Y, hexcol, 0, 7, 0, 0, TIP_("Hex triplet for color (#RRGGBB)"));
|
||||
bt = uiDefBut(block, UI_BTYPE_TEXT, 0, IFACE_("Hex: "), 0, yco, butwidth, UI_UNIT_Y, hexcol, 0, 8, 0, 0, TIP_("Hex triplet for color (#RRGGBB)"));
|
||||
UI_but_func_set(bt, ui_colorpicker_hex_rna_cb, bt, hexcol);
|
||||
bt->custom_data = cpicker;
|
||||
uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("(Gamma Corrected)"), 0, yco - UI_UNIT_Y, butwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
|
Loading…
Reference in New Issue