RFR: 8320359: ImageView: add styleable fitWidth, fitHeight, preserveRatio, smooth properties [v3]

Kevin Rushforth kcr at openjdk.org
Fri Dec 1 17:42:22 UTC 2023


On Thu, 30 Nov 2023 19:03:38 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Adding missing styleable properties to ImageView:
>> 
>> 
>> -fx-preserve-ratio
>> -fx-smooth
>> -fx-fit-width
>> -fx-fit-height
>> 
>> 
>> Updated CSS Reference.
>
> Andy Goryachev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   save 8 bytes

Looks good. I left one HTML formatting comment on the newly added `cssref.html` docs (I also left an editorial comment that you should feel free to ignore).

I'll reapprove if and when you make the suggested  doc formatting change.

modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html line 1887:

> 1885:           <th class="propertyname" scope="row">-fx-fit-height</th>
> 1886:           <td class="value"><a href="#typenumber" class="typelink"><number></a></td>
> 1887:           <td>0</td>

Since you don't specify a style class for the newly added properties, they will all be left justified. The existing `null` value for `-fx-image` specifies `class="default"` which centers it. I recommend either adding the `class="default"` to all of the newly added properties, or removing it from the default value of the existing `fx-image` property.

I'll reapprove if you want to make the change.

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

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1293#pullrequestreview-1760217314
PR Review Comment: https://git.openjdk.org/jfx/pull/1293#discussion_r1412399522


More information about the openjfx-dev mailing list