mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 22:07:01 -04:00
Remove JFXButton in AdvancedListItem
This commit is contained in:
parent
45f55b2075
commit
3323ea2be0
@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.jackhuang.hmcl.ui.construct;
|
package org.jackhuang.hmcl.ui.construct;
|
||||||
|
|
||||||
import com.jfoenix.controls.JFXButton;
|
|
||||||
import javafx.geometry.Insets;
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
@ -83,19 +82,15 @@ public class AdvancedListItemSkin extends SkinBase<AdvancedListItem> {
|
|||||||
|
|
||||||
HBox right = new HBox();
|
HBox right = new HBox();
|
||||||
right.setAlignment(Pos.CENTER);
|
right.setAlignment(Pos.CENTER);
|
||||||
right.setPickOnBounds(false);
|
right.setMouseTransparent(true);
|
||||||
|
right.getStyleClass().setAll("toggle-icon4");
|
||||||
JFXButton settings = new JFXButton();
|
FXUtils.setLimitWidth(right, 40);
|
||||||
FXUtils.setLimitWidth(settings, 40);
|
FXUtils.onChangeAndOperate(skinnable.rightGraphicProperty(),
|
||||||
settings.getStyleClass().setAll("toggle-icon4");
|
newGraphic -> right.getChildren().setAll(newGraphic));
|
||||||
settings.graphicProperty().bind(skinnable.rightGraphicProperty());
|
|
||||||
right.getChildren().setAll(settings);
|
|
||||||
root.setRight(right);
|
root.setRight(right);
|
||||||
|
|
||||||
FXUtils.onChangeAndOperate(skinnable.actionButtonVisibleProperty(), newValue -> {
|
FXUtils.onChangeAndOperate(skinnable.actionButtonVisibleProperty(),
|
||||||
if (newValue) root.setRight(right);
|
visible -> root.setRight(visible ? right : null));
|
||||||
else root.setRight(null);
|
|
||||||
});
|
|
||||||
|
|
||||||
stackPane.setStyle("-fx-padding: 10 16 10 16;");
|
stackPane.setStyle("-fx-padding: 10 16 10 16;");
|
||||||
stackPane.getStyleClass().setAll("transparent");
|
stackPane.getStyleClass().setAll("transparent");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user