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