Merge pull request #5014 from sqrrm/compensation-report

Add indication of last GH CR issue
This commit is contained in:
Christoph Atteneder 2020-12-28 19:10:15 +01:00 committed by GitHub
commit 2d2cff5b41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View file

@ -43,6 +43,8 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
public class SeparatedPhaseBars extends VBox {
// Last day for creating github compensation request issue, as decided by general consensus
private static final double LAST_COMP_REQ_GH_ISSUE = (double) 18 / 25;
private double labelMinWidth = 150;
private double breakMinWidth = 20;
private int totalDuration;
@ -68,11 +70,14 @@ public class SeparatedPhaseBars extends VBox {
item.setTitleLabel(titleLabel);
titlesBars.getChildren().addAll(titleLabel);
ProgressBar progressBar = new JFXProgressBar();
JFXProgressBar progressBar = new JFXProgressBar();
progressBar.setMinHeight(9);
progressBar.setMaxHeight(9);
progressBar.progressProperty().bind(item.progressProperty);
progressBar.setOpacity(item.isShowBlocks() ? 1 : 0.25);
if (item.phase.name().startsWith("PROPOSAL")) {
progressBar.setSecondaryProgress(LAST_COMP_REQ_GH_ISSUE);
}
progressBars.getChildren().add(progressBar);
item.setProgressBar(progressBar);
});
@ -141,6 +146,9 @@ public class SeparatedPhaseBars extends VBox {
private Label titleLabel;
@Setter
private ProgressBar progressBar;
@Setter
private int indicatorBlock;
private ProgressBar indicatorBar;
public SeparatedPhaseBarsItem(DaoPhase.Phase phase, boolean showBlocks) {
this.phase = phase;
@ -160,5 +168,6 @@ public class SeparatedPhaseBars extends VBox {
lastBlockProperty.set(lastBlock);
this.duration = duration;
}
}
}

View file

@ -527,3 +527,7 @@
.jfx-date-picker .left-button, .jfx-date-picker .right-button{
-fx-background-color: derive(-bs-color-gray-0, -10%);
}
.progress-bar > .secondary-bar {
-fx-background-color: -bs-color-gray-0;
}

View file

@ -114,3 +114,7 @@
.warning-box {
-fx-background-color: -bs-yellow-light;
}
.progress-bar > .secondary-bar {
-fx-background-color: -bs-color-gray-3;
}