On Fri, 23 Jun 2023 18:39:47 GMT, Alexey Ivanov <[email protected]> wrote:

> > Having said that, I guess XP theme also padding is not correct as can be 
> > seen in this bug [JDK-8139392](https://bugs.openjdk.org/browse/JDK-8139392) 
> > which I have rectified
> > 
> > After fix
> > ![image](https://user-images.githubusercontent.com/43534309/248217142-224f098c-5ff5-4713-8434-05d99e7d9a71.png)
> 
> Your latest changes also fix 
> [JDK-8139392](https://bugs.openjdk.org/browse/JDK-8139392), do I get it 
> right? If so, add it to the list of fixed issues.

This change does not address JDK-8139392 fully. The title bar buttons in Vista 
theme, which are still used for MDI windows, are not square. The dimensions of 
the native buttons are 32×18. The dimensions of the JInternalFrame title bar 
buttons after your fix are 24×18; before your fix they were 28×18. That is the 
width of the buttons is smaller by 8 and 4 pixels. Aren't these the values 
subtracted from the width value fetched from Windows?

As for the classic theme… It's not available in Windows anymore, there's only 
Visual-style enabled theme now. So, you can't get the dimensions of the title 
bar buttons of an MDI window. I guess the only way is to use heuristics. 
According to old screenshots I have, the main title bar buttons in Windows 98 
were 16×14 and in Windows 2000 the dimensions were 17×15. That is the buttons 
were not square, the width was 2 pixels greater than the height.

The dimensions of the buttons in the Windows classic theme after your fix are 
20×18. The buttons are still larger than they were (the height comes from the 
visual-style theme) but proportions are correct. Before the fix, the dimensions 
were 34×18 — the buttons were even wider than in the visual-style enabled theme.

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

PR Comment: https://git.openjdk.org/jdk/pull/14555#issuecomment-1624248716

Reply via email to