Fix #126551: Write Hex values using 2 digits in the color tooltips
We need to use 2 hex digits to ensure that the value displayed in the tooltips is correct. Pull Request: https://projects.blender.org/blender/blender/pulls/126580
This commit is contained in:
committed by
Jesse Yurkovich
parent
ddcf5bac44
commit
d6ea01bd38
@@ -1044,7 +1044,7 @@ static std::unique_ptr<uiTooltipData> ui_tooltip_data_from_button_or_extra_icon(
|
||||
|
||||
uchar rgb_hex_uchar[4];
|
||||
rgba_float_to_uchar(rgb_hex_uchar, color);
|
||||
const std::string hex_st = fmt::format("Hex: {:X}{:X}{:X}{:X}",
|
||||
const std::string hex_st = fmt::format("Hex: {:02X}{:02X}{:02X}{:02X}",
|
||||
int(rgb_hex_uchar[0]),
|
||||
int(rgb_hex_uchar[1]),
|
||||
int(rgb_hex_uchar[2]),
|
||||
|
||||
Reference in New Issue
Block a user