On Wed, 9 Mar 2022 07:37:31 GMT, John Hendrikx <jhendr...@openjdk.org> wrote:

> I added a test case for `SpinnerSkin` that checks the arrow positioning.
> 
> While adding the tests I discovered more problems with the positioning aside 
> from the one mentioned in the JBS ticket.
> 
> 1) Vertical split arrow placement also forgot to take the padding into 
> account while placing the decrement arrow button -- I've taken the liberty to 
> fix that problem as well in the same PR.
> 
> 2) When arrows are placed next to each other either on the right or left, the 
> arrow widths are not normalized to be the width of the widest arrow.  All 
> other placements will normalize either the width or height, except for these 
> two.  Specifically, when the arrows are **split** on the left and right they 
> **are** normalized to the same width.  
> 
> For point 2, here is the problem illustrated with actual widths on left and 
> layout result on right:
> 
>      [ <----- ] [ -> ] [ spinner ]       -->          [ <----- ] [ -> ] [ 
> spinner ]
>      [ spinner ] [ <----- ] [ -> ]       -->          [ spinner ] [ <----- ] 
> [ -> ]
> 
> While for split horizontal it does normalize the width to that of the widest 
> arrow, and so layout becomes:
> 
>      [ <----- ] [ spinner ] [ -> ]       -->          [ <----- ] [ spinner ] 
> [   ->   ]
> 
> While I'm here I could fix this as well, and adjust the test case to match.

This pull request has now been integrated.

Changeset: ba4c9c68
Author:    John Hendrikx <jhendr...@openjdk.org>
Committer: Kevin Rushforth <k...@openjdk.org>
URL:       
https://git.openjdk.java.net/jfx/commit/ba4c9c688086857cbfe019c06e51b3d110cc84f7
Stats:     147 lines in 2 files changed: 144 ins; 0 del; 3 mod

8281723: Spinner with split horizontal arrows and a border places right arrow 
incorrectly

Reviewed-by: mhanl, aghaisas

-------------

PR: https://git.openjdk.java.net/jfx/pull/748

Reply via email to