Skip to content
Snippets Groups Projects
Commit f4b1104c authored by Tobias Ullerich's avatar Tobias Ullerich Committed by Robert Goldmann
Browse files

#157 - Change checkbox behaviour for cart design colors

parent 279b4151
Branches
Tags
No related merge requests found
...@@ -52,27 +52,27 @@ public class ModernCartDesignViewController extends NVC implements IColorButton ...@@ -52,27 +52,27 @@ public class ModernCartDesignViewController extends NVC implements IColorButton
playColorButton.setStyle(getLinearGradientCss(design.getPlayColor())); playColorButton.setStyle(getLinearGradientCss(design.getPlayColor()));
cueInColorButton.setStyle(getLinearGradientCss(design.getCueInColor())); cueInColorButton.setStyle(getLinearGradientCss(design.getCueInColor()));
backgroundColorCheckbox.setSelected(!design.getBackgroundColor().equals(ModernCartDesign.DEFAULT_COLOR_BACKGROUND)); backgroundColorCheckbox.setSelected(design.isEnableCustomBackgroundColor());
playColorCheckbox.setSelected(!design.getPlayColor().equals(ModernCartDesign.DEFAULT_COLOR_PLAY)); playColorCheckbox.setSelected(design.isEnableCustomPlayColor());
cueInColorCheckbox.setSelected(!design.getCueInColor().equals(ModernCartDesign.DEFAULT_COLOR_CUE_IN)); cueInColorCheckbox.setSelected(design.isEnableCustomCueInColor());
} }
@Override @Override
public void init() { public void init() {
backgroundColorCheckbox.selectedProperty().addListener((a, b, c) -> backgroundColorCheckbox.selectedProperty().addListener((observable, oldValue, newValue) ->
{ {
design.setEnableCustomBackgroundColor(c); design.setEnableCustomBackgroundColor(newValue);
backgroundColorButton.setDisable(!c); backgroundColorButton.setDisable(!newValue);
}); });
playColorCheckbox.selectedProperty().addListener((a, b, c) -> playColorCheckbox.selectedProperty().addListener((observable, oldValue, newValue) ->
{ {
design.setEnableCustomPlayColor(c); design.setEnableCustomPlayColor(newValue);
playColorButton.setDisable(!c); playColorButton.setDisable(!newValue);
}); });
cueInColorCheckbox.selectedProperty().addListener((a, b, c) -> cueInColorCheckbox.selectedProperty().addListener((observable, oldValue, newValue) ->
{ {
design.setEnableCustomCueInColor(c); design.setEnableCustomCueInColor(newValue);
cueInColorButton.setDisable(!c); cueInColorButton.setDisable(!newValue);
}); });
backgroundColorButton.setDisable(true); backgroundColorButton.setDisable(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment