How can I get the location and width of the window / window buttons?

Windows Explorer has a really cool graphics feature, I think these buttons on the window design look really cool. I know this is not real in java, but I think it is definitely worth a try, so I made a small solution to the problem / hack that can be found here . But I had a problem: I don’t know how to get the distance between the border and the place where I can put the buttons without hiding anything. Is there any way to get this value platform - whatever? (I want to get at least the correct fill) This is what I want: for ubuntu, I would like to have the correct fill 0 and left fill as shown: Thank you for your patience. EDIT:



This is what I already have, the left pad is equal to the height of the upper border, and the right pad is hard-coded to 138 pixels. Not entirely platform independent. All I need to do is remove the decoration of the second window and add a few buttons to it. EDIT: I want to use Platform-LAF.


+4
source share
1 answer

You cannot do this. This is definitely not possible in Platform-LAF (although it is also possible in Metal).

In addition, you should not do this. See, for example, the UX Guide for Windows :

Do not add controls to the window frame. Instead, put the controls in the window.

, , :)

0

Source: https://habr.com/ru/post/1612478/


All Articles