Skip to content

Commit

Permalink
Merge pull request #5014 from sqrrm/compensation-report
Browse files Browse the repository at this point in the history
Add indication of last GH CR issue
  • Loading branch information
ripcurlx authored Dec 28, 2020
2 parents 976caeb + 1abc748 commit 2d2cff5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@

@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;
Expand All @@ -68,11 +70,14 @@ public SeparatedPhaseBars(List<SeparatedPhaseBarsItem> items) {
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);
});
Expand Down Expand Up @@ -141,6 +146,9 @@ public static class SeparatedPhaseBarsItem {
private Label titleLabel;
@Setter
private ProgressBar progressBar;
@Setter
private int indicatorBlock;
private ProgressBar indicatorBar;

public SeparatedPhaseBarsItem(DaoPhase.Phase phase, boolean showBlocks) {
this.phase = phase;
Expand All @@ -160,5 +168,6 @@ public void setPeriodRange(int firstBlock, int lastBlock, int duration) {
lastBlockProperty.set(lastBlock);
this.duration = duration;
}

}
}
4 changes: 4 additions & 0 deletions desktop/src/main/java/bisq/desktop/theme-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 4 additions & 0 deletions desktop/src/main/java/bisq/desktop/theme-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,7 @@
.warning-box {
-fx-background-color: -bs-yellow-light;
}

.progress-bar > .secondary-bar {
-fx-background-color: -bs-color-gray-3;
}

0 comments on commit 2d2cff5

Please sign in to comment.