cbfiddle / Issues

0 stars 0 forks source link

JToolBar not dark themed #2

Open ghost opened 6 years ago

ghost commented 6 years ago

Was comparing your VAqua with how the Mac OS Finder behaves. I think JToolBar and the JButtons dont get dark themed.

Here is what my application with VAqua does:

bildschirmfoto 2018-10-16 um 18 30 20

And here is what I expect to happen judging from Mac OS Finder:

bildschirmfoto 2018-10-16 um 18 37 02
cbfiddle commented 6 years ago

Be sure to read the instructions on how to enable dark mode when using bin/java to run your app.

I set the button sizes explicitly to get fixed sizes:

c.setMinimumSize(new Dimension(width, 0)); c.setMaximumSize(new Dimension(width, 1000));

Alan

On Oct 16, 2018, at 9:37 AM, Jekejeke Prolog notifications@github.com wrote:

Was comparing your VAqua with how the Mac OS Finder behaves. I think JToolBar and the JButtons dont get dark themed.

Here is what my what VAqua does:

https://user-images.githubusercontent.com/5411487/47032289-4c37c380-d172-11e8-813d-27027444e597.png And here is what I expect to happen judging from Mac OS Finder:

https://user-images.githubusercontent.com/5411487/47032369-81441600-d172-11e8-84c4-bdd2ea214539.png

cbfiddle commented 6 years ago

Also make sure you are not setting any of the containers to be opaque.

Most of the dark mode rendering is translucent and works only over the exposed native window background.

(The next release will supply a better default background for opaque components that paint using an inherited background color, but not-opaque is still better.)

On Oct 16, 2018, at 9:37 AM, Jekejeke Prolog notifications@github.com wrote:

Was comparing your VAqua with how the Mac OS Finder behaves. I think JToolBar and the JButtons dont get dark themed.

Here is what my what VAqua does:

https://user-images.githubusercontent.com/5411487/47032289-4c37c380-d172-11e8-813d-27027444e597.png And here is what I expect to happen judging from Mac OS Finder:

https://user-images.githubusercontent.com/5411487/47032369-81441600-d172-11e8-84c4-bdd2ea214539.png — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cbfiddle/Issues/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AGUkmaHzxO1oW9E4H_0mhJ6x4ylbp8cAks5ulgs_gaJpZM4Xev-x.

ghost commented 6 years ago

If I have time I will try a work-around for the tool bar. I think it makes anyway sense to have it non-opaque. And thanks to your instructions, I have a hex editor on my mac now again after 20 years.

BTW: Dark mode in VAqua works otherwise great. I made already a blog entry on Google+. Here is a dialog from my application that is rendered great:

bildschirmfoto 2018-10-16 um 18 54 10

And here is a console (the text colors are set explicitly to match the dark mode) that also works great, without dark mode the scroll bar wouldn't be dark as well:

bildschirmfoto 2018-10-16 um 18 54 42
ghost commented 6 years ago

I tried setOpaque(false) along the hierarchy. But to no avail. I also switched from JToolBar to JPanel, but it didn't work either.

This was strange, since JPanel works in my JDialogs. So now I am suspicious that the problem is related to JFrame,

and not to JToolBar per se.