On Mon, 27 Jan 2025 15:41:55 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
>>> we will violate the max constraint if we snap to a larger value. >> >> Well, it's inherently an over-constrained problem. Conceptually, though, >> this does not violate the constraint. When snap-to-pixel is enabled, all >> values, including min and max values are snapped to a pixel that can be >> almost 1 pixel larger or smaller than it's given value. Within that >> tolerance, we are honoring the min and max values. >> >> It isn't required that we always ceil the min value and floor the max value >> (not to mention that doing that is what causes the odd min > max). >> >> So I don't buy this argument. Is there some other reason to do it? > > no other reason. are you suggesting to simply `round()`? Your change to use `snapSize` for both (which ends up calling `ceil`) looks good. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1156#discussion_r1934555424