mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Don't assume background is white for disassembly view
The trail in the disassbemly view should have luminance going towards the background color, that might be different color than white. Contributed by STMicroelectronics Change-Id: I9e00e71719cbd1fb40cc5e6de983aacbcb854106 Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com>
This commit is contained in:
parent
a2e6ef61c9
commit
bd268d9f01
1 changed files with 3 additions and 2 deletions
|
@ -2933,9 +2933,10 @@ public abstract class DisassemblyPart extends WorkbenchPart
|
|||
}
|
||||
// update pc history trail
|
||||
if (fPCHistory.size() > 1) {
|
||||
final double bgLuminance = new HSL(fViewer.getTextWidget().getBackground().getRGB()).luminance;
|
||||
HSL hsv = new HSL(fPCAnnotationRGB);
|
||||
double luminanceStep = (1 - hsv.luminance) / (fPCHistorySizeMax + 1);
|
||||
hsv.luminance = 1 - luminanceStep * (fPCHistorySizeMax - fPCHistory.size());
|
||||
double luminanceStep = (bgLuminance - hsv.luminance) / (fPCHistorySizeMax + 1);
|
||||
hsv.luminance = bgLuminance - luminanceStep * (fPCHistorySizeMax - fPCHistory.size());
|
||||
for (ListIterator<AddressRangePosition> listIt = fPCHistory.listIterator(fPCHistory.size()); listIt
|
||||
.hasPrevious();) {
|
||||
AddressRangePosition pcPos = listIt.previous();
|
||||
|
|
Loading…
Add table
Reference in a new issue