1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Store syntax colors as 32-bit uints.

This commit is contained in:
Bartosz Taudul
2022-09-11 00:44:26 +02:00
parent f8cf7ff45a
commit c27bcc524c
3 changed files with 17 additions and 26 deletions
+3 -1
View File
@@ -1247,7 +1247,9 @@ void View::DrawSourceTooltip( const char* filename, uint32_t srcline, int before
ImGui::TextUnformatted( ptr, it->begin );
ImGui::SameLine( 0, 0 );
}
TextColoredUnformatted( i == srcline-1 ? SyntaxColors[(int)it->color] : SyntaxColorsDimmed[(int)it->color], it->begin, it->end );
auto color = SyntaxColors[(int)it->color];
if( i != srcline-1 ) color = ( color & 0xFFFFFF ) | 0x99000000;
TextColoredUnformatted( color, it->begin, it->end );
ImGui::SameLine( 0, 0 );
ptr = it->end;
++it;