You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Jerome Lelasseux <le...@yahoo.com.INVALID> on 2021/11/14 19:53:53 UTC
The Options ruban remains white with DarkLaf
Hi,
I made a new release of my Netbeans platform application (NB 12.5, JDK11.0.13, DarkLaf) and I noticed that the Options ruban is now white (see image attached). It was dark when I built the previous release using NB12.3 (and it's also dark in the Options dialog of NB12.5 when using DarkLaf).
I could not find any change in my code that could explain this. If someone has an idea where I should search...
ThanksJerome
Re: The Options ruban remains white with DarkLaf
Posted by Neil C Smith <ne...@apache.org>.
On Fri, 19 Nov 2021 at 19:27, Jerome Lelasseux <le...@yahoo.com> wrote:
> Adding the 2nd non-API module solved the problem, thanks Neil!
>
> This really needs to be documented somewhere. I could add an entry "How to enable FlatLaf in your NB platform application?" in the Apache Netbeans FAQ. But what is the process to do this ?
You can make a pull request against the website.
But I think we have an issue to fix here too - I'm not sure the
FlatLaf implementation module should be marked as autostart, which is
why the dependency is needed.
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: The Options ruban remains white with DarkLaf
Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
Adding the 2nd non-API module solved the problem, thanks Neil!
This really needs to be documented somewhere. I could add an entry "How to enable FlatLaf in your NB platform application?" in the Apache Netbeans FAQ. But what is the process to do this ?
Jerome
Le jeudi 18 novembre 2021, 21:14:22 UTC+1, Neil C Smith <ne...@apache.org> a écrit :
On Thu, 18 Nov 2021 at 19:56, Jerome Lelasseux <le...@yahoo.com> wrote:
> The FlatLaf module was already a dependency.
You might need to make sure you have both FlatLaf modules as
dependencies. At some point I added the non-API one in to fix
something, but I can't remember if this was it. If you're using the
Ant build, you can find it by selecting to show non-API modules.
> FYI I submitted an issue on the FlatLaf GitHub as well.
This is unlikely a bug in FlatLaf. It seems to be a bug where the
FlatLaf customs in the IDE module are not being triggered correctly.
eg. https://github.com/apache/netbeans/blob/master/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLFCustoms.java#L59
Maybe stick a breakpoint on that, launch with the debugger and see
what's happening.
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: The Options ruban remains white with DarkLaf
Posted by Neil C Smith <ne...@apache.org>.
On Thu, 18 Nov 2021 at 20:13, Neil C Smith <ne...@apache.org> wrote:
>
> On Thu, 18 Nov 2021 at 19:56, Jerome Lelasseux <le...@yahoo.com> wrote:
> > The FlatLaf module was already a dependency.
>
> You might need to make sure you have both FlatLaf modules as
> dependencies. At some point I added the non-API one in to fix
> something, but I can't remember if this was it. If you're using the
> Ant build, you can find it by selecting to show non-API modules.
Just verified removing the dependency on
org.netbeans.swing.laf.flatlaf in the application I linked to earlier,
and that replicates this issue, and a bunch of other UI issues.
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: The Options ruban remains white with DarkLaf
Posted by Neil C Smith <ne...@apache.org>.
On Thu, 18 Nov 2021 at 19:56, Jerome Lelasseux <le...@yahoo.com> wrote:
> The FlatLaf module was already a dependency.
You might need to make sure you have both FlatLaf modules as
dependencies. At some point I added the non-API one in to fix
something, but I can't remember if this was it. If you're using the
Ant build, you can find it by selecting to show non-API modules.
> FYI I submitted an issue on the FlatLaf GitHub as well.
This is unlikely a bug in FlatLaf. It seems to be a bug where the
FlatLaf customs in the IDE module are not being triggered correctly.
eg. https://github.com/apache/netbeans/blob/master/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLFCustoms.java#L59
Maybe stick a breakpoint on that, launch with the debugger and see
what's happening.
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: The Options ruban remains white with DarkLaf
Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
Thank you Neil.
I removed the 2nd line and L&F is installed OK. But the Options ribbon remains white. The FlatLaf module was already a dependency.
FYI I submitted an issue on the FlatLaf GitHub as well.
Le lundi 15 novembre 2021, 23:43:23 UTC+1, Neil C Smith <ne...@apache.org> a écrit :
On Mon, 15 Nov 2021, 21:15 Jerome Lelasseux, <le...@yahoo.com> wrote:
Sorry I meant FlatLaf Dark.
I use the following in ModuleInstall::validate()
NbPreferences.root().node("laf").put("laf", "com.formdev.flatlaf.FlatDarkLaf");
UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("FlatLaf Dark", FlatDarkLaf.class.getName()));
Try removing the second line. Leave the FlatLaf module to install the look and feel. If that's not enough also add dependencies in that module on the FlatLaf modules. See eg. https://github.com/praxis-live/praxis-live/blob/master/praxis.live.laf/src/org/praxislive/ide/laf/Installer.java#L47 This works fine for me.
Best wishes,
Neil
Re: The Options ruban remains white with DarkLaf
Posted by Neil C Smith <ne...@apache.org>.
On Mon, 15 Nov 2021, 21:15 Jerome Lelasseux, <le...@yahoo.com> wrote:
> Sorry I meant FlatLaf Dark.
>
> I use the following in ModuleInstall::validate()
>
> NbPreferences.root().node("laf").put("laf",
> "com.formdev.flatlaf.FlatDarkLaf");
> UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("FlatLaf Dark",
> FlatDarkLaf.class.getName()));
>
Try removing the second line. Leave the FlatLaf module to install the look
and feel. If that's not enough also add dependencies in that module on the
FlatLaf modules. See eg.
https://github.com/praxis-live/praxis-live/blob/master/praxis.live.laf/src/org/praxislive/ide/laf/Installer.java#L47
This works fine for me.
Best wishes,
Neil
Re: The Options ruban remains white with DarkLaf
Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
I checked the PR code and I think I found the issue. nb.options.categories.tabPanelBackground color property seems to be not defined, so it returns white.
netbeans/platform/options.api/src/org/netbeans/modules/options/OptionsPanel.java:
private Color getTabPanelBackground() {
Color uiColor = UIManager.getColor("nb.options.categories.tabPanelBackground"); //NOI18N
if (uiColor != null) {
return uiColor;
}
if( useUIDefaultsColors() ) { // true for Metal or Nimbus only
Color res = UIManager.getColor( "Tree.background" ); //NOI18N
if( null == res )
res = Color.white;
return new Color( res.getRGB() );
}
return Color.white;
}
If I add in my app licationUIManager.put("nb.options.categories.tabPanelBackground", Color.ORANGE); the Options ribbon becomes orange.
Le lundi 15 novembre 2021, 22:15:40 UTC+1, Jerome Lelasseux <le...@yahoo.com.invalid> a écrit :
Sorry I meant FlatLaf Dark.
I use the following in ModuleInstall::validate()
NbPreferences.root().node("laf").put("laf", "com.formdev.flatlaf.FlatDarkLaf");
UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("FlatLaf Dark", FlatDarkLaf.class.getName()));
I tried the 2 options mentionned in the PR (below), it had some effect but not on the Options white ribbon...
-J-Dflatlaf.useWindowDecorations=false \
-J-Dflatlaf.menuBarEmbedded=false
Le lundi 15 novembre 2021, 16:46:14 UTC+1, Neil C Smith <ne...@apache.org> a écrit :
On Sun, 14 Nov 2021 at 19:54, Jerome Lelasseux
<le...@yahoo.com.invalid> wrote:
> I made a new release of my Netbeans platform application (NB 12.5, JDK11.0.13, DarkLaf) and I noticed that the Options ruban is now white (see image attached). It was dark when I built the previous release using NB12.3 (and it's also dark in the Options dialog of NB12.5 when using DarkLaf).
>
> I could not find any change in my code that could explain this. If someone has an idea where I should search...
What is DarkLaf? Darcula or FlatLaf Dark?
How are you setting the Look and Feel? Some things changed in this
area with https://github.com/apache/netbeans/pull/2872 that might be
affected.
Best wishes,
Neil
Re: The Options ruban remains white with DarkLaf
Posted by Jerome Lelasseux <le...@yahoo.com.INVALID>.
Sorry I meant FlatLaf Dark.
I use the following in ModuleInstall::validate()
NbPreferences.root().node("laf").put("laf", "com.formdev.flatlaf.FlatDarkLaf");
UIManager.installLookAndFeel(new UIManager.LookAndFeelInfo("FlatLaf Dark", FlatDarkLaf.class.getName()));
I tried the 2 options mentionned in the PR (below), it had some effect but not on the Options white ribbon...
-J-Dflatlaf.useWindowDecorations=false \
-J-Dflatlaf.menuBarEmbedded=false
Le lundi 15 novembre 2021, 16:46:14 UTC+1, Neil C Smith <ne...@apache.org> a écrit :
On Sun, 14 Nov 2021 at 19:54, Jerome Lelasseux
<le...@yahoo.com.invalid> wrote:
> I made a new release of my Netbeans platform application (NB 12.5, JDK11.0.13, DarkLaf) and I noticed that the Options ruban is now white (see image attached). It was dark when I built the previous release using NB12.3 (and it's also dark in the Options dialog of NB12.5 when using DarkLaf).
>
> I could not find any change in my code that could explain this. If someone has an idea where I should search...
What is DarkLaf? Darcula or FlatLaf Dark?
How are you setting the Look and Feel? Some things changed in this
area with https://github.com/apache/netbeans/pull/2872 that might be
affected.
Best wishes,
Neil
Re: The Options ruban remains white with DarkLaf
Posted by Neil C Smith <ne...@apache.org>.
On Sun, 14 Nov 2021 at 19:54, Jerome Lelasseux
<le...@yahoo.com.invalid> wrote:
> I made a new release of my Netbeans platform application (NB 12.5, JDK11.0.13, DarkLaf) and I noticed that the Options ruban is now white (see image attached). It was dark when I built the previous release using NB12.3 (and it's also dark in the Options dialog of NB12.5 when using DarkLaf).
>
> I could not find any change in my code that could explain this. If someone has an idea where I should search...
What is DarkLaf? Darcula or FlatLaf Dark?
How are you setting the Look and Feel? Some things changed in this
area with https://github.com/apache/netbeans/pull/2872 that might be
affected.
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists