RFR: 8216471: GTK LnF: Frame is clipped and does not show JTable,Tooltip and JTree demo in SwingSet2 demo [v3]

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Jul 12 09:17:53 UTC 2024


On Fri, 12 Jul 2024 07:11:13 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

>> The issue is due to the preferred width of the toggle button in GTK L&F for GTK3 only.
>> Comparing the preferred width of toggle button with GTK2 or other LAF, it is much higher in GTK3. The difference is due to the insets value in GTK3.
>> 
>> In SwingSet2 demo there are as many as 16 demos are added in toolbar and the preferred width of frame is set to 720px.
>> In GTK L&F (For GTK3), overall preferred width of toolbar is ~980 px which is more than frame width and that results in the clipping of last few demos.
>> In other L&F and GTK2, the preferred width of toolbar is less than frame width. Hence, there is no clipping.
>> 
>> The proposed solution is to increase the width and height of SwingSet2 demo frame.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Panel size updated to avoid clipping in Java L&F

src/demo/share/jfc/SwingSet2/SwingSet2.java line 852:

> 850:         } else {
> 851:             if (currentLookAndFeel.name.contains("GTK")) {
> 852:                 this.setPreferredSize(new Dimension(PREFERRED_WIDTH + 260, PREFERRED_HEIGHT + 230));

It seems height increase by further 230 is too much causing too much space below JInternalFrames which again spoils the aesthetics..Guess +80 is good enough...so 980x720 as compared to 720x640

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20052#discussion_r1675565958


More information about the client-libs-dev mailing list