JavaFX/Classes/css/user/HeaderIconStyleSheet.java

35 lines
848 B
Java
Raw Permalink Normal View History

package Classes.css.user;
import Classes.css.core.Context;
import Classes.css.core.Ruleset;
import javafx.scene.Node;
public class HeaderIconStyleSheet{
/* Builds all necessary CSS/layout rules */
public HeaderIconStyleSheet(Node target) throws Exception{
/* (1) Darken main-color */
Context.bind("tmp", Context.getColor("main-color").darker() );
/* (2) Set rules */
Ruleset.load(target)
.add("top", 0)
.add("left", 0)
.add("min-width", Context.getInt("menu-width"))
.add("max-width", Context.getInt("menu-width"))
.add("min-height", Context.getInt("header-height"))
.add("max-height", Context.getInt("header-height"))
.add("pref-height", Context.getInt("header-height"))
.add("pref-width", Context.getInt("menu-width"))
.add("background-color", Context.getString("tmp"))
.apply();
}
}