private ImageView newTitleBarButton(final String imageName, final double enterBrightness, final double exitedBrightness) {
final ImageView btn = RS.imgView(imageName);
btn.setId("title-menu");
HBox.setMargin(btn, new Insets(TOP_BORDER_HEIGHT / 2 + TOP_MIN_MAX_CLOSE_ADJUSTMENT, 0, 0, 0));
final ColorAdjust btnEffect = new ColorAdjust();
//btnEffect.setContrast(enterBrightness);
btnEffect.setBrightness(exitedBrightness);
btn.setEffect(btnEffect);
btn.setOnMouseEntered(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
btnEffect.setBrightness(enterBrightness);
//btnEffect.setContrast(exitedBrightness);
}
});
btn.setOnMouseExited(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
btnEffect.setBrightness(exitedBrightness);
//btnEffect.setContrast(enterBrightness);
}
});
return btn;
}