Skip to content

MFXCircleToggleNode messed clicked area [with workaround] #387

@FelipeAumannRS

Description

@FelipeAumannRS

MFXCircleToggleNode (for some reason) have a MFXTextField which is making some trouble with the clickable area.

image
That image above shows the Circle node inside the toggle node, which is the desired click area for toggleNodes. Although, the MFXCircleToggleNode actually is a set of nodes inside a vBox (probably working as a graphic's button of the toggleNode). The only issue with that is the first index of the vBox, which is a MFXTextField. This messes with mouse events, such as hovering and clicking:

MFXTextField on the StackPane, messing up with StackPane's bounds:
MFXTextField on the MFXCircleToggleNode, messing up with StackPane's bounds
MFXCircleToggleNode showing messed "hitbox"
image

EDIT
Till this isn't fixed, here's a workaround
((VBox) yourToggleNode.getChildrenUnmodifiable().getFirst()).getChildren().removeIf(node -> node.getClass().equals(MFXTextField.class));
The workaround provided above removes MFXTextField from yourToggleNode, fixing the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions