You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "s4gh (via GitHub)" <gi...@apache.org> on 2025/10/07 08:49:20 UTC

[PR] Be able to setup FlatFal styling for code editor toolbar separately from other toolbars in application [netbeans]

s4gh opened a new pull request, #8893:
URL: https://github.com/apache/netbeans/pull/8893

   Be able to setup FlatFal styling for code editor toolbar separately from other toolbars in application.
   Main purpose - provide more flexibility in configuring FlatLaf style for NetBeans.
   
   What this change does - it adds FlatLaf styleClass property for code editor toolbar. This allows to set FlatLaf style for this tollbar separately from other toolbars in the application.
   
   Below are screenshots with example usage of this property. By settings 
   ```[style].nb-editor-toolbar   = background: #FFFFFF``` in FlatLaf.properties I can make background for code editor toolbar white while keeping other toolbars unchanged. In combination with other FlatLaf properties e.g.
   ```
   Tree.background=#F2F2F2
   ScrollBar.track=#F2F2F2
   ComboBox.background=#F2F2F2
   EditorTab.background=#F2F2F2
   EditorTab.activeBackground=#F2F2F2
   EditorTab.selectedBackground = #FFFFFF
   ViewTab.selectedBackground = #F2F2F2
   ```
   I can style NetBeans like it is displayed on screenshot. What I want to achieve in this example is to use white color for "light" LAF only for code editor area. While keeping all other panels (see screenshots) light grey.
   <img width="2498" height="1508" alt="NetBeans custom LADF properties 1" src="https://github.com/user-attachments/assets/ed95248a-f832-444a-b4d8-7d4b79006142" />
   
   <img width="1682" height="1052" alt="NetBeans custom LADF properties 2" src="https://github.com/user-attachments/assets/08f7823b-2e75-4b47-beaf-8cc00545a7c2" />
   
   
   This PR is not about all these changes you see on screenshot. PR does not change any default look and feel of NetBeans. PR is about to let people to apply their own styles in which editor toolbar can be styled differently from other toolbars in the application.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application [netbeans]

Posted by "eirikbakke (via GitHub)" <gi...@apache.org>.
eirikbakke commented on PR #8893:
URL: https://github.com/apache/netbeans/pull/8893#issuecomment-3772907789

   This particular tweak doesn't seem too bad to me; it's just a hook, albeit FlatLAF-specific, that lets an actual styling change be defined elsewhere.
   
   (In my mind, tweaks like these are slightly more acceptable with FlatLAF than with other LAFs because because styling changes going forward are likely to be done by tweaking FlatLAF rather than by swapping in entire new LAFs.)
   
   But if there's another way to do it, I don't mind that either!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application [netbeans]

Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas commented on PR #8893:
URL: https://github.com/apache/netbeans/pull/8893#issuecomment-3434212693

   Did someone mentioned Maven? :eyes: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application [netbeans]

Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net closed pull request #8893: Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application
URL: https://github.com/apache/netbeans/pull/8893


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #8893:
URL: https://github.com/apache/netbeans/pull/8893#issuecomment-3434199395

   NB 28 is branched and in the release phase, a change like this would be for NB 29 and there is no hurry for that. I did see this PR, but didn't have the time to take a proper look. Since ideally things like this would have to be registered in the FlatLaf branding module to keep things decoupled.
   
   Also please don't ping so many contributors, not all you pinged are even maintainers.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #8893:
URL: https://github.com/apache/netbeans/pull/8893#discussion_r2453377914


##########
ide/editor/src/org/netbeans/modules/editor/NbEditorToolBar.java:
##########
@@ -200,6 +200,9 @@ public NbEditorToolBar(JTextComponent component) {
         
         refreshToolbarButtons();
         setBorderPainted(true);
+
+        // Style editor toolbar separately from main toolbar [style].nb-editor-toolbar   = background: #FFFFFF
+        putClientProperty("FlatLaf.styleClass", "nb-editor-toolbar");

Review Comment:
   @DevCharly could this be put into `o.n.swing.laf.flatlaf` somehow? e.g `FlatLFCustoms` or similar?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Be able to setup FlatLaf styling for code editor toolbar separately from other toolbars in application [netbeans]

Posted by "s4gh (via GitHub)" <gi...@apache.org>.
s4gh commented on PR #8893:
URL: https://github.com/apache/netbeans/pull/8893#issuecomment-3434005864

   @mbien @steffendietz @khmarbaise @cstamas can I please ask to review this PR?
   It is literally 2 lines of code. And this changes allows to set FlarLaf style for code editor toolbar to be different from the main toolbar. This by itself gives more freedom and flexibility in respect to custom styling


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists