Skip to content
Snippets Groups Projects
Commit b13b0c03 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Change color choose button style (use flat or gradient)

parent 650676af
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ import de.tobias.playpad.DisplayableColor;
import de.tobias.playpad.PlayPadMain;
import de.tobias.playpad.design.modern.ModernColor;
import de.tobias.playpad.design.modern.model.ModernCartDesign;
import de.tobias.playpad.design.modern.model.ModernGlobalDesign;
import de.tobias.playpad.profile.Profile;
import de.tobias.playpad.view.ColorPickerView;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
......@@ -84,9 +86,12 @@ public class ModernCartDesignViewController extends NVC {
}
private String getLinearGradientCss(ModernColor color) {
String css = "-fx-background-color: " + color.linearGradient() + ";";
css += "-fx-border-color: rgb(20, 20, 20);-fx-border-width: 1.5px;-fx-border-radius: 3px;";
return css;
final ModernGlobalDesign design = Profile.currentProfile().getProfileSettings().getDesign();
if (design.isFlatDesign()) {
return "-fx-background-color: " + color.paint() + ";";
} else {
return "-fx-background-color: " + color.linearGradient() + ";";
}
}
}
......@@ -123,9 +123,10 @@ public class ModernGlobalDesignViewController extends NVC {
}
private String getLinearGradientCss(ModernColor color) {
String css = "-fx-background-color: " + color.linearGradient() + ";";
css += "-fx-border-color: rgb(20, 20, 20);-fx-border-width: 1.5px;-fx-border-radius: 3px;";
return css;
if (design.isFlatDesign()) {
return "-fx-background-color: " + color.paint() + ";";
} else {
return "-fx-background-color: " + color.linearGradient() + ";";
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment