| 933 | } |
| 934 | |
| 935 | QColor DisassemblyView::GetAddressFunctionColor(u32 address) |
| 936 | { |
| 937 | std::array<QColor, 6> colors; |
| 938 | if (!QtHost::IsDarkApplicationTheme()) |
| 939 | { |
| 940 | colors = { |
| 941 | QColor::fromRgba(0xFFFA3434), |
| 942 | QColor::fromRgba(0xFF206b6b), |
| 943 | QColor::fromRgba(0xFF858534), |
| 944 | QColor::fromRgba(0xFF378c37), |
| 945 | QColor::fromRgba(0xFF783278), |
| 946 | QColor::fromRgba(0xFF21214a), |
| 947 | }; |
| 948 | } |
| 949 | else |
| 950 | { |
| 951 | colors = { |
| 952 | QColor::fromRgba(0xFFe05555), |
| 953 | QColor::fromRgba(0xFF55e0e0), |
| 954 | QColor::fromRgba(0xFFe8e855), |
| 955 | QColor::fromRgba(0xFF55e055), |
| 956 | QColor::fromRgba(0xFFe055e0), |
| 957 | QColor::fromRgba(0xFFC2C2F5), |
| 958 | }; |
| 959 | } |
| 960 | |
| 961 | // Use the address to pick the colour since the value of the handle may |
| 962 | // change from run to run. |
| 963 | ccc::Address function_address = |
| 964 | cpu().GetSymbolGuardian().FunctionOverlappingAddress(address).address; |
| 965 | if (!function_address.valid()) |
| 966 | return palette().text().color(); |
| 967 | |
| 968 | // Chop off the first few bits of the address since functions will be |
| 969 | // aligned in memory. |
| 970 | return colors[(function_address.value >> 4) % colors.size()]; |
| 971 | } |
| 972 | |
| 973 | QString DisassemblyView::FetchSelectionInfo(SelectionInfo selInfo) |
| 974 | { |
nothing calls this directly
no test coverage detected