mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Merge pull request #6708 from helixx87/refactor-radio
Refactor "remove radio" logic in JFXRadioButtonSkinBisqStyle
This commit is contained in:
commit
df6fe57423
@ -174,7 +174,7 @@ public class JFXRadioButtonSkinBisqStyle extends RadioButtonSkin {
|
||||
protected void updateChildren() {
|
||||
super.updateChildren();
|
||||
if (radio != null) {
|
||||
removeRadio();
|
||||
getChildren().removeIf(child -> "radio".equals(child.getStyleClass().get(0)));
|
||||
getChildren().addAll(container, rippler);
|
||||
}
|
||||
}
|
||||
@ -216,15 +216,6 @@ public class JFXRadioButtonSkinBisqStyle extends RadioButtonSkin {
|
||||
ripplerWidth, ripplerHeight);
|
||||
}
|
||||
|
||||
private void removeRadio() {
|
||||
// TODO: replace with removeIf
|
||||
for (int i = 0; i < getChildren().size(); i++) {
|
||||
if ("radio".equals(getChildren().get(i).getStyleClass().get(0))) {
|
||||
getChildren().remove(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateColors() {
|
||||
boolean isSelected = getSkinnable().isSelected();
|
||||
Color unSelectedColor = ((JFXRadioButton) getSkinnable()).getUnSelectedColor();
|
||||
|
Loading…
Reference in New Issue
Block a user