controlsfx / controlsfx

High quality UI controls to complement the core JavaFX distribution
https://controlsfx.org
BSD 3-Clause "New" or "Revised" License
1.58k stars 269 forks source link

PopOver requires path clipping. #675

Open JonathanGiles opened 9 years ago

JonathanGiles commented 9 years ago

Original report by Dirk Lemmermann (Bitbucket: dlemmermann, GitHub: dlemmermann).


The PopOver control as a rather unusual shape based on a path with rounded corners. "Square" content can easily overlap these corners when padding is not an option. Hence clipping is required, ideally the same path created for the shape of the popover is also used for the clip.

In the attachment one can see that the red pane is shown on top of the rounded corners in the lower left and right corner.

Assigning this to Jonathan in hope to get some initial feedback regarding the clipping approach. I tried using the path as a clip but then the user only sees the path, nothing in the center.

JonathanGiles commented 9 years ago

Original comment by Dirk Lemmermann (Bitbucket: dlemmermann, GitHub: dlemmermann).


Fixed it. Using the same path elements as for the original path for a clipping path.Bildschirmfoto 2015-02-13 um 11.08.01.png Please notice the nice looking rounded corners at the bottom.