From 37382852fcdb061653c6fb60725a14e2bbf24fbb Mon Sep 17 00:00:00 2001 From: Sergiy Veryovka Date: Tue, 7 Oct 2025 10:36:38 +0200 Subject: [PATCH] Be able to setup FlatFal styling for code editor toolbar separately from other toolbars in application --- .../src/org/netbeans/modules/editor/NbEditorToolBar.java | 3 +++ .../src/org/netbeans/core/multiview/TabsComponent.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ide/editor/src/org/netbeans/modules/editor/NbEditorToolBar.java b/ide/editor/src/org/netbeans/modules/editor/NbEditorToolBar.java index 4821a528636e..b613a3a8998b 100644 --- a/ide/editor/src/org/netbeans/modules/editor/NbEditorToolBar.java +++ b/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"); } @Override diff --git a/platform/core.multiview/src/org/netbeans/core/multiview/TabsComponent.java b/platform/core.multiview/src/org/netbeans/core/multiview/TabsComponent.java index d72fdb06a7d2..2fcf291d1f60 100644 --- a/platform/core.multiview/src/org/netbeans/core/multiview/TabsComponent.java +++ b/platform/core.multiview/src/org/netbeans/core/multiview/TabsComponent.java @@ -98,6 +98,9 @@ public TabsComponent(boolean toolVis) { add(bar, BorderLayout.NORTH); startToggling(); setToolbarBarVisible(toolVis); + + // Style editor toolbar separately from main toolbar [style].nb-editor-toolbar = background: #FFFFFF + bar.putClientProperty("FlatLaf.styleClass", "nb-editor-toolbar"); }