mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
6161: Highlight color -> white
This commit is contained in:
parent
32c67382cc
commit
3a110c2849
@ -692,28 +692,6 @@ final public class MapPanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private final Map<Color, BufferedImage> imageCache = new HashMap<>();
|
private final Map<Color, BufferedImage> imageCache = new HashMap<>();
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param from the color to start with
|
|
||||||
* @param to the color to blend into
|
|
||||||
* @param amount the amount by which to blend
|
|
||||||
* @return a blended color
|
|
||||||
*/
|
|
||||||
private Color blend(Color from, Color to, float amount) {
|
|
||||||
float inverse = 1.0f - amount;
|
|
||||||
|
|
||||||
float fromC[] = new float[3];
|
|
||||||
from.getColorComponents(fromC);
|
|
||||||
float toC[] = new float[3];
|
|
||||||
to.getColorComponents(toC);
|
|
||||||
float result[] = new float[3];
|
|
||||||
result[0] = fromC[0] * inverse + toC[0] * amount;
|
|
||||||
result[1] = fromC[1] * inverse + toC[1] * amount;
|
|
||||||
result[2] = fromC[2] * inverse + toC[2] * amount;
|
|
||||||
|
|
||||||
return new Color(result[0], result[1], result[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param waypoint the waypoint for which to get the color
|
* @param waypoint the waypoint for which to get the color
|
||||||
@ -725,7 +703,7 @@ final public class MapPanel extends javax.swing.JPanel {
|
|||||||
Color baseColor = waypoint.getColor();
|
Color baseColor = waypoint.getColor();
|
||||||
if (waypoint.equals(currentlySelectedWaypoint)) {
|
if (waypoint.equals(currentlySelectedWaypoint)) {
|
||||||
// Highlight this waypoint since it is selected
|
// Highlight this waypoint since it is selected
|
||||||
return blend(baseColor, Color.WHITE, 0.8f);
|
return Color.WHITE;
|
||||||
} else {
|
} else {
|
||||||
return baseColor;
|
return baseColor;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user