瀏覽代碼

:recycle: Minor changes

:recycle: MFXScrollPane: added method to compute the full size of a scroll pane (including scroll bars)

:recycle: Renamed ToggleButtonsUtil to ToggleUtils, and added a utility method to quickly add several toggles to a group

:bug: MFXTitledPaneSkin: minSize of the content pane should be set according to the position

:bug: PositionUtils: fix compute position methods, as sometimes "getLayoutBounds().getHeight()" can return 0. Added a parameter to specify whether the sizes must be computed instead of using the layoutBounds

:sparkles: Added some new resources

:memo: TODO: documentation will be added in a future commit

Signed-off-by: palexdev <alessandro.parisi406@gmail.com>
palexdev 3 年之前
父節點
當前提交
aa22e3e03f

+ 9 - 0
CHANGELOG.md

@@ -18,12 +18,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### Added
 ### Added
 
 
 - New control: MFXTitledPane
 - New control: MFXTitledPane
+- Added some new resources
 
 
 ### Changes
 ### Changes
 
 
 - Added/Updated some font resources
 - Added/Updated some font resources
 - Allow controls using MFXLabeledSkinBase to display only the graphic node
 - Allow controls using MFXLabeledSkinBase to display only the graphic node
 - Improve width/height computation for MFXRectangleToggleNode
 - Improve width/height computation for MFXRectangleToggleNode
+- MFXScrollPane: added method to compute the full size of a scroll pane (including scroll bars)
+- Renamed ToggleButtonsUtil to ToggleUtils, and added a utility method to quickly add several toggles to a group
+
+### Fixed
+
+- MFXTitledPaneSkin: minSize of the content pane should be set according to the position
+- PositionUtils: fix compute position methods, as sometimes "getLayoutBounds().getHeight()" can return 0. Added a
+  parameter to specify whether the sizes must be computed instead of using the layoutBounds
 
 
 ## [11.13.3] - 10-03-2022
 ## [11.13.3] - 10-03-2022
 
 

+ 1 - 1
build.gradle

@@ -4,7 +4,7 @@ plugins {
 }
 }
 
 
 group 'io.github.palexdev'
 group 'io.github.palexdev'
-version '11.14.0-EA1'
+version '11.14.0-EA2'
 
 
 repositories {
 repositories {
     mavenCentral()
     mavenCentral()

+ 2 - 2
demo/src/main/java/io/github/palexdev/materialfx/demo/controllers/DemoController.java

@@ -23,7 +23,7 @@ import io.github.palexdev.materialfx.controls.MFXRectangleToggleNode;
 import io.github.palexdev.materialfx.controls.MFXScrollPane;
 import io.github.palexdev.materialfx.controls.MFXScrollPane;
 import io.github.palexdev.materialfx.font.MFXFontIcon;
 import io.github.palexdev.materialfx.font.MFXFontIcon;
 import io.github.palexdev.materialfx.utils.ScrollUtils;
 import io.github.palexdev.materialfx.utils.ScrollUtils;
-import io.github.palexdev.materialfx.utils.ToggleButtonsUtil;
+import io.github.palexdev.materialfx.utils.ToggleUtils;
 import io.github.palexdev.materialfx.utils.others.loader.MFXLoader;
 import io.github.palexdev.materialfx.utils.others.loader.MFXLoader;
 import io.github.palexdev.materialfx.utils.others.loader.MFXLoaderBean;
 import io.github.palexdev.materialfx.utils.others.loader.MFXLoaderBean;
 import javafx.application.Platform;
 import javafx.application.Platform;
@@ -79,7 +79,7 @@ public class DemoController implements Initializable {
 	public DemoController(Stage stage) {
 	public DemoController(Stage stage) {
 		this.stage = stage;
 		this.stage = stage;
 		this.toggleGroup = new ToggleGroup();
 		this.toggleGroup = new ToggleGroup();
-		ToggleButtonsUtil.addAlwaysOneSelectedSupport(toggleGroup);
+		ToggleUtils.addAlwaysOneSelectedSupport(toggleGroup);
 	}
 	}
 
 
 	@Override
 	@Override

+ 9 - 24
demo/src/test/java/Playground.java

@@ -1,13 +1,9 @@
-import io.github.palexdev.materialfx.controls.MFXButton;
-import io.github.palexdev.materialfx.controls.MFXTextField;
-import io.github.palexdev.materialfx.controls.MFXToggleButton;
-import io.github.palexdev.materialfx.font.MFXFontIcon;
+import io.github.palexdev.materialfx.controls.MFXTitledPane;
+import io.github.palexdev.materialfx.enums.HeaderPosition;
 import javafx.application.Application;
 import javafx.application.Application;
-import javafx.geometry.Pos;
 import javafx.scene.Scene;
 import javafx.scene.Scene;
-import javafx.scene.control.ContentDisplay;
-import javafx.scene.layout.VBox;
-import javafx.scene.paint.Color;
+import javafx.scene.layout.BorderPane;
+import javafx.scene.shape.Rectangle;
 import javafx.stage.Stage;
 import javafx.stage.Stage;
 import org.scenicview.ScenicView;
 import org.scenicview.ScenicView;
 
 
@@ -17,24 +13,13 @@ public class Playground extends Application {
 
 
 	@Override
 	@Override
 	public void start(Stage primaryStage) {
 	public void start(Stage primaryStage) {
-		VBox vBox = new VBox(10);
-		vBox.setAlignment(Pos.CENTER);
+		BorderPane bp = new BorderPane();
 
 
-		MFXTextField textField = new MFXTextField("15.0", "", "Pixels");
+		MFXTitledPane tp = new MFXTitledPane("SideBar", new Rectangle(200, 1200));
+		tp.setHeaderPos(HeaderPosition.LEFT);
+		bp.setRight(tp);
 
 
-		MFXButton button = new MFXButton("Change Measure Unit");
-		button.setOnAction(event -> {
-			String measureUnit = textField.getMeasureUnit();
-			measureUnit = (measureUnit == null || measureUnit.isEmpty()) ? "px" : "cm";
-			textField.setMeasureUnit(measureUnit);
-		});
-
-		MFXToggleButton tb = new MFXToggleButton("Text", MFXFontIcon.getRandomIcon(24, Color.BLACK));
-		tb.setContentDisposition(ContentDisplay.GRAPHIC_ONLY);
-		tb.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
-
-		vBox.getChildren().addAll(button, textField, tb);
-		Scene scene = new Scene(vBox, 800, 800);
+		Scene scene = new Scene(bp, 1440, 900);
 		primaryStage.setScene(scene);
 		primaryStage.setScene(scene);
 		primaryStage.show();
 		primaryStage.show();
 
 

+ 1 - 1
materialfx/gradle.properties

@@ -1,6 +1,6 @@
 GROUP=io.github.palexdev
 GROUP=io.github.palexdev
 POM_ARTIFACT_ID=materialfx
 POM_ARTIFACT_ID=materialfx
-VERSION_NAME=11.14.0-EA1
+VERSION_NAME=11.14.0-EA2
 
 
 POM_NAME=materialfx
 POM_NAME=materialfx
 POM_DESCRIPTION=Material Desgin components for JavaFX
 POM_DESCRIPTION=Material Desgin components for JavaFX

+ 26 - 0
materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXScrollPane.java

@@ -19,11 +19,13 @@
 package io.github.palexdev.materialfx.controls;
 package io.github.palexdev.materialfx.controls;
 
 
 import io.github.palexdev.materialfx.MFXResourcesLoader;
 import io.github.palexdev.materialfx.MFXResourcesLoader;
+import io.github.palexdev.materialfx.beans.SizeBean;
 import io.github.palexdev.materialfx.skins.MFXScrollPaneSkin;
 import io.github.palexdev.materialfx.skins.MFXScrollPaneSkin;
 import io.github.palexdev.materialfx.utils.ColorUtils;
 import io.github.palexdev.materialfx.utils.ColorUtils;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.scene.Node;
 import javafx.scene.Node;
+import javafx.scene.control.ScrollBar;
 import javafx.scene.control.ScrollPane;
 import javafx.scene.control.ScrollPane;
 import javafx.scene.control.Skin;
 import javafx.scene.control.Skin;
 import javafx.scene.paint.Color;
 import javafx.scene.paint.Color;
@@ -40,6 +42,8 @@ public class MFXScrollPane extends ScrollPane {
 	//================================================================================
 	//================================================================================
 	private final String STYLE_CLASS = "mfx-scroll-pane";
 	private final String STYLE_CLASS = "mfx-scroll-pane";
 	private final String STYLESHEET = MFXResourcesLoader.load("css/MFXScrollPane.css");
 	private final String STYLESHEET = MFXResourcesLoader.load("css/MFXScrollPane.css");
+	private ScrollBar vBar;
+	private ScrollBar hBar;
 
 
 	//================================================================================
 	//================================================================================
 	// Constructors
 	// Constructors
@@ -61,6 +65,28 @@ public class MFXScrollPane extends ScrollPane {
 		addListeners();
 		addListeners();
 	}
 	}
 
 
+	public SizeBean getFullSizes() {
+		ScrollBar vBar = (this.vBar != null) ? this.vBar : (ScrollBar) lookup(".vBar");
+		ScrollBar hBar = (this.hBar != null) ? this.hBar : (ScrollBar) lookup(".hBar");
+
+		this.vBar = vBar;
+		this.hBar = hBar;
+
+		double vBarW = (vBar != null) ?
+				vBar.snappedLeftInset() + vBar.prefWidth(-1) + vBar.snappedRightInset() :
+				0.0;
+
+		double hBarH = (hBar != null) ?
+				hBar.snappedTopInset() + hBar.prefHeight(-1) + hBar.snappedBottomInset() :
+				0.0;
+
+		double contentW = (getContent() != null) ? getContent().prefWidth(-1) : 0.0;
+		double contentH = (getContent() != null) ? getContent().prefHeight(-1) : 0.0;
+		double fullW = snappedLeftInset() + contentW + snappedRightInset() + vBarW;
+		double fullH = snappedTopInset() + contentH + snappedBottomInset() + hBarH;
+		return SizeBean.of(fullW, fullH);
+	}
+
 	//================================================================================
 	//================================================================================
 	// Style Properties
 	// Style Properties
 	//================================================================================
 	//================================================================================

+ 2 - 2
materialfx/src/main/java/io/github/palexdev/materialfx/controls/MFXToggleButton.java

@@ -24,7 +24,7 @@ import io.github.palexdev.materialfx.controls.base.MFXLabeled;
 import io.github.palexdev.materialfx.skins.MFXToggleButtonSkin;
 import io.github.palexdev.materialfx.skins.MFXToggleButtonSkin;
 import io.github.palexdev.materialfx.utils.ColorUtils;
 import io.github.palexdev.materialfx.utils.ColorUtils;
 import io.github.palexdev.materialfx.utils.StyleablePropertiesUtils;
 import io.github.palexdev.materialfx.utils.StyleablePropertiesUtils;
-import io.github.palexdev.materialfx.utils.ToggleButtonsUtil;
+import io.github.palexdev.materialfx.utils.ToggleUtils;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.property.SimpleBooleanProperty;
@@ -114,7 +114,7 @@ public class MFXToggleButton extends Labeled implements Toggle, MFXLabeled {
 				if (isSelected()) {
 				if (isSelected()) {
 					tg.selectToggle(this);
 					tg.selectToggle(this);
 				} else if (tg.getSelectedToggle() == this) {
 				} else if (tg.getSelectedToggle() == this) {
-					ToggleButtonsUtil.clearSelectedToggle(tg);
+					ToggleUtils.clearSelectedToggle(tg);
 				}
 				}
 			}
 			}
 		});
 		});

+ 128 - 115
materialfx/src/main/java/io/github/palexdev/materialfx/font/FontResources.java

@@ -19,7 +19,7 @@
 package io.github.palexdev.materialfx.font;
 package io.github.palexdev.materialfx.font;
 
 
 /**
 /**
- * Enumerator class for MaterialFX font resources. (Count: 154)
+ * Enumerator class for MaterialFX font resources. (Count: 167)
  */
  */
 public enum FontResources {
 public enum FontResources {
 	ANGLE_DOWN("mfx-angle-down", '\uE900'),
 	ANGLE_DOWN("mfx-angle-down", '\uE900'),
@@ -62,120 +62,133 @@ public enum FontResources {
 	CONTENT_COPY("mfx-content-copy", '\uE925'),
 	CONTENT_COPY("mfx-content-copy", '\uE925'),
 	CONTENT_CUT("mfx-content-cut", '\uE926'),
 	CONTENT_CUT("mfx-content-cut", '\uE926'),
 	CONTENT_PASTE("mfx-content-paste", '\uE927'),
 	CONTENT_PASTE("mfx-content-paste", '\uE927'),
-	DEBUG("mfx-debug", '\uE928'),
-	DELETE("mfx-delete", '\uE929'),
-	DELETE_ALT("mfx-delete-alt", '\uE92A'),
-	DO_NOT_ENTER_CIRCLE("mfx-do-not-enter-circle", '\uE92B'),
-	ELLIPSIS_VERTICAL("mfx-ellipsis-vertical", '\uE92C'),
-	EXCLAMATION_CIRCLE("mfx-exclamation-circle", '\uE92D'),
-	EXCLAMATION_CIRCLE_FILLED("mfx-exclamation-circle-filled", '\uE92E'),
-	EXCLAMATION_TRIANGLE("mfx-exclamation-triangle", '\uE92F'),
-	EXPAND("mfx-expand", '\uE930'),
-	EYE("mfx-eye", '\uE931'),
-	EYE_SLASH("mfx-eye-slash", '\uE932'),
-	FILE("mfx-file", '\uE933'),
-	FILES("mfx-files", '\uE934'),
-	FILTER("mfx-filter", '\uE935'),
-	FILTER_ALT("mfx-filter-alt", '\uE936'),
-	FILTER_ALT_CLEAR("mfx-filter-alt-clear", '\uE937'),
-	FIRST_PAGE("mfx-first-page", '\uE938'),
-	FIT("mfx-fit", '\uE939'),
-	FOLDER("mfx-folder", '\uE93A'),
-	FONTICONS("mfx-fonticons", '\uE93B'),
-	GEAR("mfx-gear", '\uE93C'),
-	GEAR_ALT("mfx-gear-alt", '\uE93D'),
-	GEARS("mfx-gears", '\uE93E'),
-	GOOGLE("mfx-google", '\uE93F'),
-	GOOGLE_DRAWING("mfx-google-drawing", '\uE940'),
-	GOOGLE_DRIVE("mfx-google-drive", '\uE941'),
-	GOOGLE_FORMS("mfx-google-forms", '\uE942'),
-	GOOGLE_FUSION_TABLES("mfx-google-fusion-tables", '\uE943'),
-	GOOGLE_PRESENTATION("mfx-google-presentation", '\uE944'),
-	GOOGLE_SCRIPT("mfx-google-script", '\uE945'),
-	GOOGLE_SITES("mfx-google-sites", '\uE946'),
-	HOME("mfx-home", '\uE947'),
-	HYPHEN("mfx-hyphen", '\uE948'),
-	IMAGE("mfx-image", '\uE949'),
-	INFO("mfx-info", '\uE94A'),
-	INFO_CIRCLE("mfx-info-circle", '\uE94B'),
-	INFO_CIRCLE_LIGHT("mfx-info-circle-light", '\uE94C'),
-	INFO_SQUARE("mfx-info-square", '\uE94D'),
-	INFO_SQUARE_LIGHT("mfx-info-square-light", '\uE94E'),
-	INPUT_PIPE("mfx-input-pipe", '\uE94F'),
-	INPUT_PIPE_ALT("mfx-input-pipe-alt", '\uE950'),
-	LAST_PAGE("mfx-last-page", '\uE951'),
-	LEVEL_UP("mfx-level-up", '\uE952'),
-	LIST_DROPDOWN("mfx-list-dropdown", '\uE953'),
-	LOCK("mfx-lock", '\uE954'),
-	LOCK_OPEN("mfx-lock-open", '\uE955'),
-	LOGO("mfx-logo", '\uE956'),
-	LOGO_ALT("mfx-logo-alt", '\uE957'),
-	MAGNIFYING_GLASS("mfx-magnifying-glass", '\uE958'),
-	MAGNIFYING_GLASS_LIGHT("mfx-magnifying-glass-light", '\uE959'),
-	MAGNIFYING_GLASS_MINUS("mfx-magnifying-glass-minus", '\uE95A'),
-	MAGNIFYING_GLASS_MINUS_LIGHT("mfx-magnifying-glass-minus-light", '\uE95B'),
-	MAGNIFYING_GLASS_PLUS("mfx-magnifying-glass-plus", '\uE95C'),
-	MAGNIFYING_GLASS_PLUS_LIGHT("mfx-magnifying-glass-plus-light", '\uE95D'),
-	MAP("mfx-map", '\uE95E'),
-	MENU_V1("mfx-menu-v1", '\uE95F'),
-	MENU_V2("mfx-menu-v2", '\uE960'),
-	MENU_V3("mfx-menu-v3", '\uE961'),
-	MESSAGE("mfx-message", '\uE962'),
-	MESSAGES("mfx-messages", '\uE963'),
-	MINUS("mfx-minus", '\uE964'),
-	MINUS_CIRCLE("mfx-minus-circle", '\uE965'),
-	MODENA_MARK("mfx-modena-mark", '\uE966'),
-	MUSIC("mfx-music", '\uE967'),
-	NEXT("mfx-next", '\uE968'),
-	PLUS("mfx-plus", '\uE969'),
-	PROGRESS_BARS("mfx-progress-bars", '\uE96A'),
-	PROGRESS_BARS_ALT("mfx-progress-bars-alt", '\uE96B'),
-	REDO("mfx-redo", '\uE96C'),
-	RESTORE("mfx-restore", '\uE96D'),
-	SCROLL_BAR("mfx-scroll-bar", '\uE96E'),
-	SELECT_ALL("mfx-select-all", '\uE96F'),
-	SHORTCUT("mfx-shortcut", '\uE970'),
-	SIDEBAR_CLOSE("mfx-sidebar-close", '\uE971'),
-	SIDEBAR_OPEN("mfx-sidebar-open", '\uE972'),
-	SLIDERS("mfx-sliders", '\uE973'),
-	SPREADSHEET("mfx-spreadsheet", '\uE974'),
-	SQUARE_CHEVRON_DOWN("mfx-square-chevron-down", '\uE975'),
-	SQUARE_CHEVRON_LEFT("mfx-square-chevron-left", '\uE976'),
-	SQUARE_CHEVRON_RIGHT("mfx-square-chevron-right", '\uE977'),
-	SQUARE_CHEVRON_UP("mfx-square-chevron-up", '\uE978'),
-	SQUARE_LIST("mfx-square-list", '\uE979'),
-	SQUARE_PEN("mfx-square-pen", '\uE97A'),
-	SQUARE_PLUS("mfx-square-plus", '\uE97B'),
-	STEP_BACKWARD("mfx-step-backward", '\uE97C'),
-	STEP_FORWARD("mfx-step-forward", '\uE97D'),
-	STEPPER("mfx-stepper", '\uE97E'),
-	SYNC("mfx-sync", '\uE97F'),
-	SYNC_LIGHT("mfx-sync-light", '\uE980'),
-	TABLE("mfx-table", '\uE981'),
-	TABLE_ALT("mfx-table-alt", '\uE982'),
-	TOGGLE_OFF("mfx-toggle-off", '\uE983'),
-	TOGGLE_ON("mfx-toggle-on", '\uE984'),
-	UNDO("mfx-undo", '\uE985'),
-	USER("mfx-user", '\uE986'),
-	USERS("mfx-users", '\uE987'),
-	VARIANT10_MARK("mfx-variant10-mark", '\uE988'),
-	VARIANT11_MARK("mfx-variant11-mark", '\uE989'),
-	VARIANT12_MARK("mfx-variant12-mark", '\uE98A'),
-	VARIANT13_MARK("mfx-variant13-mark", '\uE98B'),
-	VARIANT14_MARK("mfx-variant14-mark", '\uE98C'),
-	VARIANT3_MARK("mfx-variant3-mark", '\uE98D'),
-	VARIANT4_MARK("mfx-variant4-mark", '\uE98E'),
-	VARIANT5_MARK("mfx-variant5-mark", '\uE98F'),
-	VARIANT6_MARK("mfx-variant6-mark", '\uE990'),
-	VARIANT7_MARK("mfx-variant7-mark", '\uE991'),
-	VARIANT8_MARK("mfx-variant8-mark", '\uE992'),
-	VARIANT9_MARK("mfx-variant9-mark", '\uE993'),
-	VIDEO("mfx-video", '\uE994'),
-	X("mfx-x", '\uE995'),
-	X_ALT("mfx-x-alt", '\uE996'),
-	X_CIRCLE("mfx-x-circle", '\uE997'),
-	X_CIRCLE_LIGHT("mfx-x-circle-light", '\uE998'),
-	X_LIGHT("mfx-x-light", '\uE999');
+	CSS("mfx-css", '\uE928'),
+	CSS_ALT("mfx-css-alt", '\uE929'),
+	DEBUG("mfx-debug", '\uE92A'),
+	DELETE("mfx-delete", '\uE92B'),
+	DELETE_ALT("mfx-delete-alt", '\uE92C'),
+	DO_NOT_ENTER_CIRCLE("mfx-do-not-enter-circle", '\uE92D'),
+	ELLIPSIS_VERTICAL("mfx-ellipsis-vertical", '\uE92E'),
+	EXCLAMATION_CIRCLE("mfx-exclamation-circle", '\uE92F'),
+	EXCLAMATION_CIRCLE_FILLED("mfx-exclamation-circle-filled", '\uE930'),
+	EXCLAMATION_TRIANGLE("mfx-exclamation-triangle", '\uE931'),
+	EXPAND("mfx-expand", '\uE932'),
+	EYE("mfx-eye", '\uE933'),
+	EYE_SLASH("mfx-eye-slash", '\uE934'),
+	FILE("mfx-file", '\uE935'),
+	FILES("mfx-files", '\uE936'),
+	FILTER("mfx-filter", '\uE937'),
+	FILTER_ALT("mfx-filter-alt", '\uE938'),
+	FILTER_ALT_CLEAR("mfx-filter-alt-clear", '\uE939'),
+	FIRST_PAGE("mfx-first-page", '\uE93A'),
+	FIT("mfx-fit", '\uE93B'),
+	FOLDER("mfx-folder", '\uE93C'),
+	FONTICONS("mfx-fonticons", '\uE93D'),
+	FUNCTION("mfx-function", '\uE93E'),
+	FUNCTION_LIGHT("mfx-function-light", '\uE93F'),
+	GEAR("mfx-gear", '\uE940'),
+	GEAR_ALT("mfx-gear-alt", '\uE941'),
+	GEARS("mfx-gears", '\uE942'),
+	GOOGLE("mfx-google", '\uE943'),
+	GOOGLE_DRAWING("mfx-google-drawing", '\uE944'),
+	GOOGLE_DRIVE("mfx-google-drive", '\uE945'),
+	GOOGLE_FORMS("mfx-google-forms", '\uE946'),
+	GOOGLE_FUSION_TABLES("mfx-google-fusion-tables", '\uE947'),
+	GOOGLE_PRESENTATION("mfx-google-presentation", '\uE948'),
+	GOOGLE_SCRIPT("mfx-google-script", '\uE949'),
+	GOOGLE_SITES("mfx-google-sites", '\uE94A'),
+	HOME("mfx-home", '\uE94B'),
+	HYPHEN("mfx-hyphen", '\uE94C'),
+	IMAGE("mfx-image", '\uE94D'),
+	INFO("mfx-info", '\uE94E'),
+	INFO_CIRCLE("mfx-info-circle", '\uE94F'),
+	INFO_CIRCLE_LIGHT("mfx-info-circle-light", '\uE950'),
+	INFO_SQUARE("mfx-info-square", '\uE951'),
+	INFO_SQUARE_LIGHT("mfx-info-square-light", '\uE952'),
+	INPUT_PIPE("mfx-input-pipe", '\uE953'),
+	INPUT_PIPE_ALT("mfx-input-pipe-alt", '\uE954'),
+	LAST_PAGE("mfx-last-page", '\uE955'),
+	LAYER_GROUP("mfx-layer-group", '\uE956'),
+	LAYER_GROUP_LIGHT("mfx-layer-group-light", '\uE957'),
+	LAYOUTS_ALT("mfx-layouts-alt", '\uE958'),
+	LAYOUTS_ALT_LIGHT("mfx-layouts-alt-light", '\uE959'),
+	LEVEL_UP("mfx-level-up", '\uE95A'),
+	LIST_DROPDOWN("mfx-list-dropdown", '\uE95B'),
+	LOCK("mfx-lock", '\uE95C'),
+	LOCK_OPEN("mfx-lock-open", '\uE95D'),
+	LOGO("mfx-logo", '\uE95E'),
+	LOGO_ALT("mfx-logo-alt", '\uE95F'),
+	MAGNIFYING_GLASS("mfx-magnifying-glass", '\uE960'),
+	MAGNIFYING_GLASS_LIGHT("mfx-magnifying-glass-light", '\uE961'),
+	MAGNIFYING_GLASS_MINUS("mfx-magnifying-glass-minus", '\uE962'),
+	MAGNIFYING_GLASS_MINUS_LIGHT("mfx-magnifying-glass-minus-light", '\uE963'),
+	MAGNIFYING_GLASS_PLUS("mfx-magnifying-glass-plus", '\uE964'),
+	MAGNIFYING_GLASS_PLUS_LIGHT("mfx-magnifying-glass-plus-light", '\uE965'),
+	MAP("mfx-map", '\uE966'),
+	MENU_V1("mfx-menu-v1", '\uE967'),
+	MENU_V2("mfx-menu-v2", '\uE968'),
+	MENU_V3("mfx-menu-v3", '\uE969'),
+	MENU_V3_LIGHT("mfx-menu-v3-light", '\uE96A'),
+	MESSAGE("mfx-message", '\uE96B'),
+	MESSAGES("mfx-messages", '\uE96C'),
+	MINUS("mfx-minus", '\uE96D'),
+	MINUS_CIRCLE("mfx-minus-circle", '\uE96E'),
+	MODENA_MARK("mfx-modena-mark", '\uE96F'),
+	MUSIC("mfx-music", '\uE970'),
+	NEXT("mfx-next", '\uE971'),
+	PEN_FIELD("mfx-pen-field", '\uE972'),
+	PEN_FIELD_LIGHT("mfx-pen-field-light", '\uE973'),
+	PLUS("mfx-plus", '\uE974'),
+	PROGRESS_BARS("mfx-progress-bars", '\uE975'),
+	PROGRESS_BARS_ALT("mfx-progress-bars-alt", '\uE976'),
+	REDO("mfx-redo", '\uE977'),
+	RESTORE("mfx-restore", '\uE978'),
+	SCROLL_BAR("mfx-scroll-bar", '\uE979'),
+	SELECT_ALL("mfx-select-all", '\uE97A'),
+	SHORTCUT("mfx-shortcut", '\uE97B'),
+	SIDEBAR_CLOSE("mfx-sidebar-close", '\uE97C'),
+	SIDEBAR_OPEN("mfx-sidebar-open", '\uE97D'),
+	SLIDERS("mfx-sliders", '\uE97E'),
+	SPARKLES("mfx-sparkles", '\uE97F'),
+	SPARKLES_LIGHT("mfx-sparkles-light", '\uE980'),
+	SPREADSHEET("mfx-spreadsheet", '\uE981'),
+	SQUARE_CHEVRON_DOWN("mfx-square-chevron-down", '\uE982'),
+	SQUARE_CHEVRON_LEFT("mfx-square-chevron-left", '\uE983'),
+	SQUARE_CHEVRON_RIGHT("mfx-square-chevron-right", '\uE984'),
+	SQUARE_CHEVRON_UP("mfx-square-chevron-up", '\uE985'),
+	SQUARE_LIST("mfx-square-list", '\uE986'),
+	SQUARE_PEN("mfx-square-pen", '\uE987'),
+	SQUARE_PLUS("mfx-square-plus", '\uE988'),
+	STEP_BACKWARD("mfx-step-backward", '\uE989'),
+	STEP_FORWARD("mfx-step-forward", '\uE98A'),
+	STEPPER("mfx-stepper", '\uE98B'),
+	SYNC("mfx-sync", '\uE98C'),
+	SYNC_LIGHT("mfx-sync-light", '\uE98D'),
+	TABLE("mfx-table", '\uE98E'),
+	TABLE_ALT("mfx-table-alt", '\uE98F'),
+	TOGGLE_OFF("mfx-toggle-off", '\uE990'),
+	TOGGLE_ON("mfx-toggle-on", '\uE991'),
+	UNDO("mfx-undo", '\uE992'),
+	USER("mfx-user", '\uE993'),
+	USERS("mfx-users", '\uE994'),
+	VARIANT10_MARK("mfx-variant10-mark", '\uE995'),
+	VARIANT11_MARK("mfx-variant11-mark", '\uE996'),
+	VARIANT12_MARK("mfx-variant12-mark", '\uE997'),
+	VARIANT13_MARK("mfx-variant13-mark", '\uE998'),
+	VARIANT14_MARK("mfx-variant14-mark", '\uE999'),
+	VARIANT3_MARK("mfx-variant3-mark", '\uE99A'),
+	VARIANT4_MARK("mfx-variant4-mark", '\uE99B'),
+	VARIANT5_MARK("mfx-variant5-mark", '\uE99C'),
+	VARIANT6_MARK("mfx-variant6-mark", '\uE99D'),
+	VARIANT7_MARK("mfx-variant7-mark", '\uE99E'),
+	VARIANT8_MARK("mfx-variant8-mark", '\uE99F'),
+	VARIANT9_MARK("mfx-variant9-mark", '\uE9A0'),
+	VIDEO("mfx-video", '\uE9A1'),
+	X("mfx-x", '\uE9A2'),
+	X_ALT("mfx-x-alt", '\uE9A3'),
+	X_CIRCLE("mfx-x-circle", '\uE9A4'),
+	X_CIRCLE_LIGHT("mfx-x-circle-light", '\uE9A5'),
+	X_LIGHT("mfx-x-light", '\uE9A6');
 
 
 	public static FontResources findByDescription(String description) {
 	public static FontResources findByDescription(String description) {
 		for (FontResources font : values()) {
 		for (FontResources font : values()) {

+ 13 - 0
materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXScrollPaneSkin.java

@@ -19,9 +19,14 @@
 package io.github.palexdev.materialfx.skins;
 package io.github.palexdev.materialfx.skins;
 
 
 import io.github.palexdev.materialfx.controls.MFXScrollPane;
 import io.github.palexdev.materialfx.controls.MFXScrollPane;
+import javafx.geometry.Orientation;
+import javafx.scene.Node;
+import javafx.scene.control.ScrollBar;
 import javafx.scene.control.skin.ScrollPaneSkin;
 import javafx.scene.control.skin.ScrollPaneSkin;
 import javafx.scene.layout.StackPane;
 import javafx.scene.layout.StackPane;
 
 
+import java.util.Set;
+
 /**
 /**
  * Skin used for {@link MFXScrollPane}, this class' purpose is to
  * Skin used for {@link MFXScrollPane}, this class' purpose is to
  * fix a bug of ScrollPanes' viewport which makes the content blurry.
  * fix a bug of ScrollPanes' viewport which makes the content blurry.
@@ -34,5 +39,13 @@ public class MFXScrollPaneSkin extends ScrollPaneSkin {
 		super(scrollPane);
 		super(scrollPane);
 		StackPane viewPort = (StackPane) scrollPane.lookup(".viewport");
 		StackPane viewPort = (StackPane) scrollPane.lookup(".viewport");
 		viewPort.setCache(false);
 		viewPort.setCache(false);
+
+		Set<Node> nodes = scrollPane.lookupAll(".scroll-bar");
+		nodes.forEach(node -> {
+			if (node instanceof ScrollBar) {
+				ScrollBar sb = ((ScrollBar) node);
+				sb.getStyleClass().add(sb.getOrientation() == Orientation.VERTICAL ? "vBar" : "hBar");
+			}
+		});
 	}
 	}
 }
 }

+ 4 - 1
materialfx/src/main/java/io/github/palexdev/materialfx/skins/MFXTitledPaneSkin.java

@@ -85,7 +85,6 @@ public class MFXTitledPaneSkin extends SkinBase<MFXTitledPane> {
 		contentPane = new StackPane();
 		contentPane = new StackPane();
 		contentPane.getStyleClass().add("content-pane");
 		contentPane.getStyleClass().add("content-pane");
 		if (content != null) contentPane.getChildren().add(content);
 		if (content != null) contentPane.getChildren().add(content);
-		contentPane.setMinSize(Region.USE_PREF_SIZE, Region.USE_PREF_SIZE);
 
 
 		clip = new Rectangle();
 		clip = new Rectangle();
 		clip();
 		clip();
@@ -185,16 +184,20 @@ public class MFXTitledPaneSkin extends SkinBase<MFXTitledPane> {
 		switch (position) {
 		switch (position) {
 			case RIGHT:
 			case RIGHT:
 				bp.setRight(header);
 				bp.setRight(header);
+				contentPane.setMinSize(Region.USE_PREF_SIZE, Region.USE_COMPUTED_SIZE);
 				break;
 				break;
 			case BOTTOM:
 			case BOTTOM:
 				bp.setBottom(header);
 				bp.setBottom(header);
+				contentPane.setMinSize(Region.USE_COMPUTED_SIZE, Region.USE_PREF_SIZE);
 				break;
 				break;
 			case LEFT:
 			case LEFT:
 				bp.setLeft(header);
 				bp.setLeft(header);
+				contentPane.setMinSize(Region.USE_PREF_SIZE, Region.USE_COMPUTED_SIZE);
 				break;
 				break;
 			case TOP:
 			case TOP:
 			default:
 			default:
 				bp.setTop(header);
 				bp.setTop(header);
+				contentPane.setMinSize(Region.USE_COMPUTED_SIZE, Region.USE_PREF_SIZE);
 		}
 		}
 	}
 	}
 
 

+ 9 - 10
materialfx/src/main/java/io/github/palexdev/materialfx/utils/PositionUtils.java

@@ -79,11 +79,11 @@ public class PositionUtils {
 	//================================================================================
 	//================================================================================
 	public static PositionBean computePosition(Region parent, Node child, double areaX, double areaY, double areaWidth, double areaHeight,
 	public static PositionBean computePosition(Region parent, Node child, double areaX, double areaY, double areaWidth, double areaHeight,
 	                                           double areaBaselineOffset, Insets margin, HPos hAlignment, VPos vAlignment) {
 	                                           double areaBaselineOffset, Insets margin, HPos hAlignment, VPos vAlignment) {
-		return computePosition(parent, child, areaX, areaY, areaWidth, areaHeight, areaBaselineOffset, margin, hAlignment, vAlignment, true);
+		return computePosition(parent, child, areaX, areaY, areaWidth, areaHeight, areaBaselineOffset, margin, hAlignment, vAlignment, true, true);
 	}
 	}
 
 
 	public static PositionBean computePosition(Region parent, Node child, double areaX, double areaY, double areaWidth, double areaHeight,
 	public static PositionBean computePosition(Region parent, Node child, double areaX, double areaY, double areaWidth, double areaHeight,
-	                                           double areaBaselineOffset, Insets margin, HPos hAlignment, VPos vAlignment, boolean snapToPixel) {
+	                                           double areaBaselineOffset, Insets margin, HPos hAlignment, VPos vAlignment, boolean snapToPixel, boolean computeSizes) {
 
 
 		Insets snappedMargin = margin == null ? Insets.EMPTY : margin;
 		Insets snappedMargin = margin == null ? Insets.EMPTY : margin;
 		if (snapToPixel) {
 		if (snapToPixel) {
@@ -95,12 +95,12 @@ public class PositionUtils {
 			);
 			);
 		}
 		}
 
 
-		double xPosition = computeXPosition(parent, child, areaX, areaWidth, snappedMargin, false, hAlignment, snapToPixel);
-		double yPosition = computeYPosition(parent, child, areaY, areaHeight, areaBaselineOffset, snappedMargin, false, vAlignment, snapToPixel);
+		double xPosition = computeXPosition(parent, child, areaX, areaWidth, snappedMargin, false, hAlignment, snapToPixel, computeSizes);
+		double yPosition = computeYPosition(parent, child, areaY, areaHeight, areaBaselineOffset, snappedMargin, false, vAlignment, snapToPixel, computeSizes);
 		return PositionBean.of(xPosition, yPosition);
 		return PositionBean.of(xPosition, yPosition);
 	}
 	}
 
 
-	public static double computeXPosition(Region parent, Node child, double areaX, double areaWidth, Insets margin, boolean snapMargin, HPos hAlignment, boolean snapToPixel) {
+	public static double computeXPosition(Region parent, Node child, double areaX, double areaWidth, Insets margin, boolean snapMargin, HPos hAlignment, boolean snapToPixel, boolean computeSizes) {
 		Insets snappedMargin = margin == null ? Insets.EMPTY : margin;
 		Insets snappedMargin = margin == null ? Insets.EMPTY : margin;
 		if (snapMargin) {
 		if (snapMargin) {
 			snappedMargin = InsetsFactory.of(
 			snappedMargin = InsetsFactory.of(
@@ -113,12 +113,12 @@ public class PositionUtils {
 
 
 		final double leftMargin = snappedMargin.getLeft();
 		final double leftMargin = snappedMargin.getLeft();
 		final double rightMargin = snappedMargin.getRight();
 		final double rightMargin = snappedMargin.getRight();
-		final double xOffset = leftMargin + computeXOffset(areaWidth - leftMargin - rightMargin, child.getLayoutBounds().getWidth(), hAlignment);
+		final double xOffset = leftMargin + computeXOffset(areaWidth - leftMargin - rightMargin, computeSizes ? child.prefWidth(-1) : child.getLayoutBounds().getWidth(), hAlignment);
 		final double xPosition = areaX + xOffset;
 		final double xPosition = areaX + xOffset;
 		return snapToPixel ? parent.snapPositionX(xPosition) : xPosition;
 		return snapToPixel ? parent.snapPositionX(xPosition) : xPosition;
 	}
 	}
 
 
-	public static double computeYPosition(Region parent, Node child, double areaY, double areaHeight, double areaBaselineOffset, Insets margin, boolean snapMargin, VPos vAlignment, boolean snapToPixel) {
+	public static double computeYPosition(Region parent, Node child, double areaY, double areaHeight, double areaBaselineOffset, Insets margin, boolean snapMargin, VPos vAlignment, boolean snapToPixel, boolean computeSizes) {
 		Insets snappedMargin = margin == null ? Insets.EMPTY : margin;
 		Insets snappedMargin = margin == null ? Insets.EMPTY : margin;
 		if (snapMargin) {
 		if (snapMargin) {
 			snappedMargin = InsetsFactory.of(
 			snappedMargin = InsetsFactory.of(
@@ -135,13 +135,12 @@ public class PositionUtils {
 		if (vAlignment == VPos.BASELINE) {
 		if (vAlignment == VPos.BASELINE) {
 			double bo = child.getBaselineOffset();
 			double bo = child.getBaselineOffset();
 			if (bo == Node.BASELINE_OFFSET_SAME_AS_HEIGHT) {
 			if (bo == Node.BASELINE_OFFSET_SAME_AS_HEIGHT) {
-				// We already know the layout bounds at this stage, so we can use them
-				yOffset = areaBaselineOffset - child.getLayoutBounds().getHeight();
+				yOffset = areaBaselineOffset - (computeSizes ? child.prefHeight(-1) : child.getLayoutBounds().getHeight());
 			} else {
 			} else {
 				yOffset = areaBaselineOffset - bo;
 				yOffset = areaBaselineOffset - bo;
 			}
 			}
 		} else {
 		} else {
-			yOffset = topMargin + computeYOffset(areaHeight - topMargin - bottomMargin, child.getLayoutBounds().getHeight(), vAlignment);
+			yOffset = topMargin + computeYOffset(areaHeight - topMargin - bottomMargin, computeSizes ? child.prefHeight(-1) : child.getLayoutBounds().getHeight(), vAlignment);
 		}
 		}
 		final double yPosition = areaY + yOffset;
 		final double yPosition = areaY + yOffset;
 		return snapToPixel ? parent.snapPositionY(yPosition) : yPosition;
 		return snapToPixel ? parent.snapPositionY(yPosition) : yPosition;

+ 8 - 2
materialfx/src/main/java/io/github/palexdev/materialfx/utils/ToggleButtonsUtil.java → materialfx/src/main/java/io/github/palexdev/materialfx/utils/ToggleUtils.java

@@ -28,7 +28,7 @@ import javafx.scene.input.MouseEvent;
 /**
 /**
  * Utils class for {@code ToggleButtons}.
  * Utils class for {@code ToggleButtons}.
  */
  */
-public class ToggleButtonsUtil {
+public class ToggleUtils {
 
 
 	private static final EventHandler<MouseEvent> consumeMouseEventFilter = (MouseEvent mouseEvent) -> {
 	private static final EventHandler<MouseEvent> consumeMouseEventFilter = (MouseEvent mouseEvent) -> {
 		if (((Toggle) mouseEvent.getSource()).isSelected()) {
 		if (((Toggle) mouseEvent.getSource()).isSelected()) {
@@ -56,7 +56,7 @@ public class ToggleButtonsUtil {
 				}
 				}
 			}
 			}
 		});
 		});
-		toggleGroup.getToggles().forEach(ToggleButtonsUtil::addConsumeMouseEventFilter);
+		toggleGroup.getToggles().forEach(ToggleUtils::addConsumeMouseEventFilter);
 	}
 	}
 
 
 	/**
 	/**
@@ -74,4 +74,10 @@ public class ToggleButtonsUtil {
 		}
 		}
 		toggleGroup.selectToggle(null);
 		toggleGroup.selectToggle(null);
 	}
 	}
+
+	public static void addTogglesTo(ToggleGroup tg, Toggle... toggles) {
+		for (Toggle toggle : toggles) {
+			toggle.setToggleGroup(tg);
+		}
+	}
 }
 }

+ 3 - 1
materialfx/src/main/resources/io/github/palexdev/materialfx/css/MFXTitledPane.css

@@ -1,5 +1,6 @@
 @import "Fonts.css";
 @import "Fonts.css";
 @import "MFXColors.css";
 @import "MFXColors.css";
+@import "MFXScrollPane.css";
 
 
 .mfx-titled-pane {
 .mfx-titled-pane {
 	-fx-background-color: white;
 	-fx-background-color: white;
@@ -30,8 +31,9 @@
 }
 }
 
 
 .mfx-titled-pane .content-pane {
 .mfx-titled-pane .content-pane {
-	-fx-padding: 10 5 10 5;
+	-fx-background-color: transparent;
 	-fx-border-color: lightgray transparent transparent transparent;
 	-fx-border-color: lightgray transparent transparent transparent;
+	-fx-padding: 10 5 10 5;
 }
 }
 
 
 .mfx-titled-pane:focused .content-pane {
 .mfx-titled-pane:focused .content-pane {

二進制
materialfx/src/main/resources/io/github/palexdev/materialfx/fonts/MFXResources.ttf