On Nov 24, 2020, at 7:21 PM, Prasanta Sadhukhan <psadhuk...@openjdk.java.net> 
wrote:
> 
> On Tue, 24 Nov 2020 21:23:38 GMT, Sergey Bylokhov <s...@openjdk.org 
> <mailto:s...@openjdk.org>> wrote:
> 
>>> Tried to find and change tabpane background color for "selected" tab but 
>>> unable to do so. 
>>> Tried changing AquaLookAndFeel.tabBackgroundColor, TabbedPane.background 
>>> color to no avail. Tried to set background by calling 
>>> tabPane.setbackground() in AquaTabbedPaneUI.installDefaults but it sets 
>>> background for non-selected tab (keeping black background for selected tab 
>>> in mohave unchanged). I see it's been like that at least from jdk8GA.
>>> Post to apple forum is unanswered.
>> 
>>> When inactive, I use 0 0 0 192. As far as I can tell, this does not 
>>> correspond to a named color.
>>> It would be wrong to assume that Apple only uses named colors in their UIs.
>>> The named colors are for application developers, not for Apple itself.
>> 
>> The problem here is that we do not control the color of the tab pane, it is 
>> controlled by Apple, and if we hardcore some color on our side we will get 
>> the same bugs again and again. I am sure that a similar bug will come in the 
>> dark mode if we will enable it.
> 
> Since color of tabpane is controlled by Apple, Can you point me to the code 
> where we call Apple api to draw the color of tabpane?
> 

You don’t. All you do is ask for a Tab style button:
protected final AquaPainter<JRSUIState> painter = 
AquaPainter.create(JRSUIStateFactory.getTab());
It's a nice abstract interface, but it lacks the corresponding API for getting 
the Tab text color to match a given appearance and state.

Basically, the API is incomplete and has not been kept up to date.
Otherwise, VAqua would not exist. :-)

Reply via email to