This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-23934 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 28de8f95ff17a9f0994f68ab10d6ed05e0dbaaa9 Author: Claus Ibsen <[email protected]> AuthorDate: Wed Jul 8 11:53:07 2026 +0200 CAMEL-23934: Replace hardcoded Color.WHITE with Theme.baseFg() White text is invisible on light theme backgrounds. Replace all ~45 semantic Color.WHITE usages across 15 files with Theme.baseFg() which resolves to the appropriate foreground per active theme. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../dsl/jbang/core/commands/tui/BeansTab.java | 4 +-- .../dsl/jbang/core/commands/tui/BrowseTab.java | 8 ++--- .../jbang/core/commands/tui/CaptionOverlay.java | 5 ++-- .../dsl/jbang/core/commands/tui/DiagramTab.java | 6 ++-- .../dsl/jbang/core/commands/tui/ErrorsTab.java | 14 ++++----- .../jbang/core/commands/tui/HeapHistogramTab.java | 13 +++++---- .../dsl/jbang/core/commands/tui/HistoryTab.java | 16 +++++----- .../dsl/jbang/core/commands/tui/MemoryLeakTab.java | 34 +++++++++++----------- .../dsl/jbang/core/commands/tui/MemoryTab.java | 11 +++---- .../dsl/jbang/core/commands/tui/MetricsTab.java | 4 +-- .../dsl/jbang/core/commands/tui/ProcessTab.java | 2 +- .../dsl/jbang/core/commands/tui/RoutesTab.java | 6 ++-- .../dsl/jbang/core/commands/tui/SpansTab.java | 4 +-- .../dsl/jbang/core/commands/tui/SqlQueryTab.java | 2 +- .../dsl/jbang/core/commands/tui/StartupTab.java | 2 +- 15 files changed, 66 insertions(+), 65 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java index c240d3202275..cfc2d36801d4 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BeansTab.java @@ -254,7 +254,7 @@ class BeansTab extends AbstractTableTab { if (bean.type != null && !bean.type.isEmpty()) { lines.add(Line.from( Span.styled(" Type: ", Style.EMPTY.dim()), - Span.styled(bean.type, Style.EMPTY.fg(Color.WHITE)))); + Span.styled(bean.type, Style.EMPTY.fg(Theme.baseFg())))); } // properties @@ -280,7 +280,7 @@ class BeansTab extends AbstractTableTab { Span.styled(" " + String.format("%-" + nameWidth + "s", prop.name), Style.EMPTY.fg(Color.CYAN)), Span.styled(String.format("%-15s", shortPropType), Style.EMPTY.dim()), Span.styled(" = ", Style.EMPTY.dim()), - Span.styled(value, "null".equals(value) ? Style.EMPTY.dim() : Style.EMPTY.fg(Color.WHITE)))); + Span.styled(value, "null".equals(value) ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg())))); } } else { lines.add(Line.from(Span.raw(""))); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java index e0869ca3cc05..013a931f2cf1 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/BrowseTab.java @@ -408,11 +408,11 @@ class BrowseTab extends AbstractTab { List<Line> lines = new ArrayList<>(); lines.add(Line.from( Span.styled(" Exchange ID: ", Theme.label().bold()), - Span.styled(msg.exchangeId != null ? msg.exchangeId : "", Style.EMPTY.fg(Color.WHITE)))); + Span.styled(msg.exchangeId != null ? msg.exchangeId : "", Style.EMPTY.fg(Theme.baseFg())))); if (msg.exchangePattern != null) { lines.add(Line.from( Span.styled(" Pattern: ", Theme.label().bold()), - Span.styled(msg.exchangePattern, Style.EMPTY.fg(Color.WHITE)))); + Span.styled(msg.exchangePattern, Style.EMPTY.fg(Theme.baseFg())))); } lines.add(Line.from(Span.raw(""))); @@ -423,7 +423,7 @@ class BrowseTab extends AbstractTab { lines.add(Line.from( Span.styled(" " + entry.getKey(), Style.EMPTY.fg(Color.CYAN)), Span.styled(" = ", Style.EMPTY.dim()), - Span.styled(entry.getValue(), Style.EMPTY.fg(Color.WHITE)))); + Span.styled(entry.getValue(), Style.EMPTY.fg(Theme.baseFg())))); } lines.add(Line.from(Span.raw(""))); } @@ -440,7 +440,7 @@ class BrowseTab extends AbstractTab { } } for (String line : bodyText.split("\n", -1)) { - lines.add(Line.from(Span.styled(" " + line, Style.EMPTY.fg(Color.WHITE)))); + lines.add(Line.from(Span.styled(" " + line, Style.EMPTY.fg(Theme.baseFg())))); } } else { lines.add(Line.from(Span.styled(" (empty)", Style.EMPTY.dim()))); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CaptionOverlay.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CaptionOverlay.java index c2eda8dfff1f..3ce026f22d79 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CaptionOverlay.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CaptionOverlay.java @@ -20,7 +20,6 @@ import java.util.ArrayList; import java.util.List; import dev.tamboui.layout.Rect; -import dev.tamboui.style.Color; import dev.tamboui.style.Style; import dev.tamboui.terminal.Frame; import dev.tamboui.text.Line; @@ -188,7 +187,7 @@ class CaptionOverlay { } private void renderInline(Frame frame, Rect area) { - Style style = Style.EMPTY.fg(Color.WHITE).bold(); + Style style = Style.EMPTY.fg(Theme.baseFg()).bold(); String text = inlineBuffer != null ? inlineBuffer.toString() : ""; String display = text + "█"; @@ -222,7 +221,7 @@ class CaptionOverlay { Style style; if (captionFullyTypedTime == 0 || now - captionFullyTypedTime < HOLD_DURATION_MS) { - style = Style.EMPTY.fg(Color.WHITE).bold(); + style = Style.EMPTY.fg(Theme.baseFg()).bold(); } else { style = Style.EMPTY.dim(); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java index 72c33876d30a..d85901a5d735 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/DiagramTab.java @@ -427,7 +427,7 @@ class DiagramTab extends AbstractTab { if (route != null) { lines.add(Line.from( Span.styled(" Route: ", Theme.label().bold()), - Span.styled(route.routeId, Style.EMPTY.fg(Color.WHITE).bold()))); + Span.styled(route.routeId, Style.EMPTY.fg(Theme.baseFg()).bold()))); lines.add(Line.from( Span.styled(" From: ", Style.EMPTY.dim()), Span.raw(route.from != null ? route.from : ""))); @@ -518,7 +518,7 @@ class DiagramTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( Span.styled(isInbound ? " To route: " : " From route: ", Style.EMPTY.dim()), - Span.styled(connectedRoute, Style.EMPTY.fg(Color.WHITE)))); + Span.styled(connectedRoute, Style.EMPTY.fg(Theme.baseFg())))); } } if (topoNode.exchangesTotal > 0 || topoNode.exchangesFailed > 0) { @@ -578,7 +578,7 @@ class DiagramTab extends AbstractTab { if (linkedRoute != null && diagram.getRouteLayout(linkedRoute) != null) { lines.add(Line.from( Span.styled(" ↵ ", Theme.label().bold()), - Span.styled(linkedRoute, Style.EMPTY.fg(Color.WHITE)))); + Span.styled(linkedRoute, Style.EMPTY.fg(Theme.baseFg())))); } else if (ln.treeNode != null && ln.treeNode.info.remote) { String arrow = "from".equals(ln.type) ? " external → " : " → external"; lines.add(Line.from( diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java index 105acb1296af..78e432b9f48a 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ErrorsTab.java @@ -313,7 +313,7 @@ class ErrorsTab extends AbstractTableTab { Line title = Line.from(Span.styled( String.format(" Error Topology — step %d/%d ", diagram.getHistoryStepIndex() + 1, diagram.getHistoryStepCount()), - Style.EMPTY.fg(Color.WHITE))); + Style.EMPTY.fg(Theme.baseFg()))); diagram.renderHistoryTopologyDiagram(frame, diagramArea, title); } else { String routeId = diagram.getHistoryDrillDownRouteId(); @@ -569,7 +569,7 @@ class ErrorsTab extends AbstractTableTab { private Line buildErrorBreadcrumbTitle() { Style nameStyle = Theme.label().bold(); List<Span> spans = new ArrayList<>(); - spans.add(Span.styled(" Error [", Style.EMPTY.fg(Color.WHITE))); + spans.add(Span.styled(" Error [", Style.EMPTY.fg(Theme.baseFg()))); var stack = diagram.getHistoryNavigationStack(); if (stack.isEmpty()) { spans.add(Span.styled(diagram.getHistoryDrillDownRouteId(), nameStyle)); @@ -582,7 +582,7 @@ class ErrorsTab extends AbstractTableTab { } spans.add(Span.styled(String.format("] — step %d/%d ", diagram.getHistoryStepIndex() + 1, diagram.getHistoryStepCount()), - Style.EMPTY.fg(Color.WHITE))); + Style.EMPTY.fg(Theme.baseFg()))); return Line.from(spans); } @@ -687,10 +687,10 @@ class ErrorsTab extends AbstractTableTab { private static void hintShowBhpv(List<Span> spans, boolean body, boolean headers, boolean props, boolean vars) { spans.add(Span.styled(" show", Theme.hintKey())); spans.add(Span.raw(" ")); - spans.add(Span.styled(body ? "B" : "b", body ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); - spans.add(Span.styled(headers ? "H" : "h", headers ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); - spans.add(Span.styled(props ? "P" : "p", props ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); - spans.add(Span.styled(vars ? "V" : "v", vars ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(body ? "B" : "b", body ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(headers ? "H" : "h", headers ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(props ? "P" : "p", props ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(vars ? "V" : "v", vars ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); spans.add(Span.raw(" ")); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java index 2c90a40f6a8f..9f4aee91ba31 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HeapHistogramTab.java @@ -197,12 +197,13 @@ class HeapHistogramTab extends AbstractTableTab { Span.styled(className, Style.EMPTY.fg(Color.CYAN)))); lines.add(Line.from( Span.styled(" Package: ", Theme.label().bold()), - Span.styled(pkg.isEmpty() ? "(none)" : pkg, pkg.isEmpty() ? Style.EMPTY.dim() : Style.EMPTY.fg(Color.WHITE)))); + Span.styled(pkg.isEmpty() ? "(none)" : pkg, + pkg.isEmpty() ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( Span.styled(" Instances: ", Theme.label().bold()), - Span.styled(formatNumber(entry.instances), Style.EMPTY.fg(Color.WHITE)), + Span.styled(formatNumber(entry.instances), Style.EMPTY.fg(Theme.baseFg())), Span.styled(" Bytes: ", Theme.label().bold()), - Span.styled(formatBytes(entry.bytes), Style.EMPTY.fg(Color.WHITE)))); + Span.styled(formatBytes(entry.bytes), Style.EMPTY.fg(Theme.baseFg())))); // Package summary if (!pkg.isEmpty()) { @@ -222,11 +223,11 @@ class HeapHistogramTab extends AbstractTableTab { Span.styled("(" + pkg + ")", Style.EMPTY.dim()))); lines.add(Line.from( Span.styled(" Classes: ", Theme.label()), - Span.styled(formatNumber(pkgClasses), Style.EMPTY.fg(Color.WHITE)), + Span.styled(formatNumber(pkgClasses), Style.EMPTY.fg(Theme.baseFg())), Span.styled(" Instances: ", Theme.label()), - Span.styled(formatNumber(pkgInstances), Style.EMPTY.fg(Color.WHITE)), + Span.styled(formatNumber(pkgInstances), Style.EMPTY.fg(Theme.baseFg())), Span.styled(" Bytes: ", Theme.label()), - Span.styled(formatBytes(pkgBytes), Style.EMPTY.fg(Color.WHITE)))); + Span.styled(formatBytes(pkgBytes), Style.EMPTY.fg(Theme.baseFg())))); } // JAR info diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java index 319c4aa97625..1e472be41bc4 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/HistoryTab.java @@ -694,7 +694,7 @@ class HistoryTab extends AbstractTab { Line title = Line.from(Span.styled( String.format(" History Topology — step %d/%d ", diagram.getHistoryStepIndex() + 1, diagram.getHistoryStepCount()), - Style.EMPTY.fg(Color.WHITE))); + Style.EMPTY.fg(Theme.baseFg()))); diagram.renderHistoryTopologyDiagram(frame, diagramArea, title); } else { String routeId = diagram.getHistoryDrillDownRouteId(); @@ -812,7 +812,7 @@ class HistoryTab extends AbstractTab { private Line buildHistoryBreadcrumbTitle() { Style nameStyle = Theme.label().bold(); List<Span> spans = new ArrayList<>(); - spans.add(Span.styled(" History [", Style.EMPTY.fg(Color.WHITE))); + spans.add(Span.styled(" History [", Style.EMPTY.fg(Theme.baseFg()))); var stack = diagram.getHistoryNavigationStack(); if (stack.isEmpty()) { spans.add(Span.styled(diagram.getHistoryDrillDownRouteId(), nameStyle)); @@ -825,7 +825,7 @@ class HistoryTab extends AbstractTab { } spans.add(Span.styled(String.format("] — step %d/%d ", diagram.getHistoryStepIndex() + 1, diagram.getHistoryStepCount()), - Style.EMPTY.fg(Color.WHITE))); + Style.EMPTY.fg(Theme.baseFg()))); return Line.from(spans); } @@ -1503,7 +1503,7 @@ class HistoryTab extends AbstractTab { Span.styled(label, labelStyle), Span.styled(bar, bandStyle), Span.raw(" ".repeat(pad)), - Span.styled(durationStr, isRoute ? Style.EMPTY.dim() : Style.EMPTY.fg(Color.WHITE).bold())); + Span.styled(durationStr, isRoute ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg()).bold())); } private static boolean nodeIdEquals(String a, String b) { @@ -1883,10 +1883,10 @@ class HistoryTab extends AbstractTab { private static void hintShowBhpv(List<Span> spans, boolean body, boolean headers, boolean props, boolean vars) { spans.add(Span.styled(" show", Theme.hintKey())); spans.add(Span.raw(" ")); - spans.add(Span.styled(body ? "B" : "b", body ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); - spans.add(Span.styled(headers ? "H" : "h", headers ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); - spans.add(Span.styled(props ? "P" : "p", props ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); - spans.add(Span.styled(vars ? "V" : "v", vars ? Style.EMPTY.fg(Color.WHITE).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(body ? "B" : "b", body ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(headers ? "H" : "h", headers ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(props ? "P" : "p", props ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); + spans.add(Span.styled(vars ? "V" : "v", vars ? Style.EMPTY.fg(Theme.baseFg()).bold() : Style.EMPTY.dim())); spans.add(Span.raw(" ")); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java index 370ab6b124d1..e2c0e49e29b0 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryLeakTab.java @@ -245,7 +245,7 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( Span.styled(" Duration: ", Theme.label().bold()), - Span.styled(duration + "s", Style.EMPTY.fg(Color.WHITE)), + Span.styled(duration + "s", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" (use ", Style.EMPTY.dim()), Span.styled("+", Theme.label().bold()), Span.styled("/", Style.EMPTY.dim()), @@ -254,7 +254,7 @@ class MemoryLeakTab extends AbstractTab { String modeLabel = recordingMode == RecordingMode.DUAL ? "dual" : "single"; lines.add(Line.from( Span.styled(" Mode: ", Theme.label().bold()), - Span.styled("[" + modeLabel + "]", Style.EMPTY.fg(Color.WHITE)), + Span.styled("[" + modeLabel + "]", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" (press ", Style.EMPTY.dim()), Span.styled("d", Theme.label().bold()), Span.styled(" to toggle)", Style.EMPTY.dim()))); @@ -267,11 +267,11 @@ class MemoryLeakTab extends AbstractTab { Span.styled(" Runs two sequential JFR recordings:", Style.EMPTY.dim()))); lines.add(Line.from( Span.styled(" Run 1: ", Style.EMPTY.fg(Color.CYAN)), - Span.styled(duration + "s", Style.EMPTY.fg(Color.WHITE)), + Span.styled(duration + "s", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" baseline recording", Style.EMPTY.dim()))); lines.add(Line.from( Span.styled(" Run 2: ", Style.EMPTY.fg(Color.CYAN)), - Span.styled((duration * 2) + "s", Style.EMPTY.fg(Color.WHITE)), + Span.styled((duration * 2) + "s", Style.EMPTY.fg(Theme.baseFg())), Span.styled(" comparison recording (2x duration)", Style.EMPTY.dim()))); lines.add(Line.from( Span.styled(" Compares trends to detect leaks: classes growing faster", Style.EMPTY.dim()))); @@ -320,13 +320,13 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( Span.styled(" Elapsed: ", Theme.label().bold()), - Span.styled(elapsedSec + "s", Style.EMPTY.fg(Color.WHITE)))); + Span.styled(elapsedSec + "s", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( Span.styled(" Remaining: ", Theme.label().bold()), - Span.styled(remainingSec + "s", Style.EMPTY.fg(Color.WHITE)))); + Span.styled(remainingSec + "s", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( Span.styled(" Duration: ", Theme.label().bold()), - Span.styled(currentRecordingDuration + "s", Style.EMPTY.fg(Color.WHITE)))); + Span.styled(currentRecordingDuration + "s", Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from(Span.raw(""))); lines.add(Line.from( Span.styled(" Press ", Style.EMPTY.dim()), @@ -437,7 +437,7 @@ class MemoryLeakTab extends AbstractTab { Constraint.length(8), Constraint.length(12), Constraint.length(13)) - .highlightStyle(Style.EMPTY.fg(Color.WHITE).bold().onBlue()) + .highlightStyle(Style.EMPTY.fg(Theme.baseFg()).bold().onBlue()) .highlightSpacing(Table.HighlightSpacing.ALWAYS) .block(Block.builder().borderType(BorderType.ROUNDED).borders(Borders.ALL).title(title).build()) .build(); @@ -471,19 +471,19 @@ class MemoryLeakTab extends AbstractTab { List<Span> infoSpans = new ArrayList<>(); if (entry.count > 1) { infoSpans.add(Span.styled(" Count: ", Theme.label().bold())); - infoSpans.add(Span.styled(String.valueOf(entry.count), Style.EMPTY.fg(Color.WHITE))); + infoSpans.add(Span.styled(String.valueOf(entry.count), Style.EMPTY.fg(Theme.baseFg()))); } if (entry.sampledSize > 0) { infoSpans.add(Span.styled(infoSpans.isEmpty() ? " Sampled: " : " Sampled: ", Theme.label().bold())); - infoSpans.add(Span.styled(formatBytes(entry.sampledSize), Style.EMPTY.fg(Color.WHITE))); + infoSpans.add(Span.styled(formatBytes(entry.sampledSize), Style.EMPTY.fg(Theme.baseFg()))); } if (!infoSpans.isEmpty()) { lines.add(Line.from(infoSpans)); } lines.add(Line.from( Span.styled(" Age: ", Theme.label().bold()), - Span.styled(formatDuration(entry.objectAge), Style.EMPTY.fg(Color.WHITE)))); + Span.styled(formatDuration(entry.objectAge), Style.EMPTY.fg(Theme.baseFg())))); // Reference chain if (entry.referenceChain != null && !entry.referenceChain.isEmpty()) { @@ -513,7 +513,7 @@ class MemoryLeakTab extends AbstractTab { Span.styled(" Allocation Stack Trace:", Theme.label().bold()))); for (StackEntry frame2 : entry.stackTrace) { - Style methodStyle = isJdkFrame(frame2.method) ? Style.EMPTY.dim() : Style.EMPTY.fg(Color.WHITE); + Style methodStyle = isJdkFrame(frame2.method) ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg()); lines.add(Line.from( Span.styled(" at ", Style.EMPTY.dim()), Span.styled(frame2.method, methodStyle), @@ -592,7 +592,7 @@ class MemoryLeakTab extends AbstractTab { Constraint.length(10), Constraint.length(9), Constraint.length(13)) - .highlightStyle(Style.EMPTY.fg(Color.WHITE).bold().onBlue()) + .highlightStyle(Style.EMPTY.fg(Theme.baseFg()).bold().onBlue()) .highlightSpacing(Table.HighlightSpacing.ALWAYS) .block(Block.builder().borderType(BorderType.ROUNDED).borders(Borders.ALL).title(title).build()) .build(); @@ -626,11 +626,11 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from( Span.styled(" Run 1: ", Theme.label().bold()), Span.styled(formatBytes(entry.baselineSampledSize) + " (" + entry.baselineCount + " samples)", - Style.EMPTY.fg(Color.WHITE)))); + Style.EMPTY.fg(Theme.baseFg())))); lines.add(Line.from( Span.styled(" Run 2: ", Theme.label().bold()), Span.styled(formatBytes(entry.currentSampledSize) + " (" + entry.currentCount + " samples)", - Style.EMPTY.fg(Color.WHITE)))); + Style.EMPTY.fg(Theme.baseFg())))); if (entry.growthRatio > 0) { String growthLabel = entry.lowConfidence ? "~" + formatGrowthPercent(entry.growthRatio) @@ -638,7 +638,7 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from( Span.styled(" Growth: ", Theme.label().bold()), Span.styled(growthLabel, - entry.growthRatio > 1.3 ? Style.EMPTY.fg(Color.RED).bold() : Style.EMPTY.fg(Color.WHITE)))); + entry.growthRatio > 1.3 ? Style.EMPTY.fg(Color.RED).bold() : Style.EMPTY.fg(Theme.baseFg())))); } if (entry.lowConfidence) { lines.add(Line.from( @@ -675,7 +675,7 @@ class MemoryLeakTab extends AbstractTab { lines.add(Line.from( Span.styled(" Allocation Stack Trace:", Theme.label().bold()))); for (StackEntry se : entry.stackTrace) { - Style methodStyle = isJdkFrame(se.method) ? Style.EMPTY.dim() : Style.EMPTY.fg(Color.WHITE); + Style methodStyle = isJdkFrame(se.method) ? Style.EMPTY.dim() : Style.EMPTY.fg(Theme.baseFg()); lines.add(Line.from( Span.styled(" at ", Style.EMPTY.dim()), Span.styled(se.method, methodStyle), diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java index 8f61f268379b..f12a948ab9f7 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MemoryTab.java @@ -135,7 +135,7 @@ class MemoryTab extends AbstractTab { lines.add(Line.from( Span.styled(" used: ", Style.EMPTY.dim()), - Span.styled(formatBytes(info.heapMemUsed), Style.EMPTY.fg(Color.WHITE).bold()))); + Span.styled(formatBytes(info.heapMemUsed), Style.EMPTY.fg(Theme.baseFg()).bold()))); if (info.heapMemCommitted > 0) { long pctComm = info.heapMemUsed * 100 / info.heapMemCommitted; @@ -180,7 +180,7 @@ class MemoryTab extends AbstractTab { lines.add(Line.from( Span.styled(" Old Gen: ", Style.EMPTY.dim()), - Span.styled(String.format("%-10s", formatBytes(info.oldGenUsed)), Style.EMPTY.fg(Color.WHITE).bold()), + Span.styled(String.format("%-10s", formatBytes(info.oldGenUsed)), Style.EMPTY.fg(Theme.baseFg()).bold()), Span.styled(oldGauge, oldColor), Span.styled(String.format(" %d%%", oldPct), oldColor.bold()))); lines.add(Line.from( @@ -197,14 +197,15 @@ class MemoryTab extends AbstractTab { Span.styled(" Non-Heap Memory", Style.EMPTY.fg(Color.CYAN).bold()))); lines.add(Line.from( Span.styled(" used: ", Style.EMPTY.dim()), - Span.styled(String.format("%-10s", formatBytes(info.nonHeapMemUsed)), Style.EMPTY.fg(Color.WHITE).bold()), + Span.styled(String.format("%-10s", formatBytes(info.nonHeapMemUsed)), + Style.EMPTY.fg(Theme.baseFg()).bold()), Span.styled(" committed: ", Style.EMPTY.dim()), Span.raw(formatBytes(info.nonHeapMemCommitted)))); } if (info.metaspaceUsed > 0) { lines.add(Line.from( Span.styled(" Metaspace: ", Style.EMPTY.dim()), - Span.styled(String.format("%-10s", formatBytes(info.metaspaceUsed)), Style.EMPTY.fg(Color.WHITE).bold()), + Span.styled(String.format("%-10s", formatBytes(info.metaspaceUsed)), Style.EMPTY.fg(Theme.baseFg()).bold()), Span.styled(" committed: ", Style.EMPTY.dim()), Span.raw(formatBytes(info.metaspaceCommitted)), info.metaspaceMax > 0 @@ -218,7 +219,7 @@ class MemoryTab extends AbstractTab { List<Span> threadSpans = new ArrayList<>(); threadSpans.add(Span.styled(" Threads", Style.EMPTY.fg(Color.CYAN).bold())); threadSpans.add(Span.styled(" current: ", Style.EMPTY.dim())); - threadSpans.add(Span.styled(String.valueOf(info.threadCount), Style.EMPTY.fg(Color.WHITE).bold())); + threadSpans.add(Span.styled(String.valueOf(info.threadCount), Style.EMPTY.fg(Theme.baseFg()).bold())); threadSpans.add(Span.styled(" peak: ", Style.EMPTY.dim())); threadSpans.add(Span.raw(String.valueOf(info.peakThreadCount))); lines.add(Line.from(threadSpans)); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java index 7b4c900f7f4e..9e57bbe9adbf 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/MetricsTab.java @@ -61,7 +61,7 @@ class MetricsTab extends AbstractTableTab { private static final int MOUSE_SCROLL_LINES = 3; private static final Style LABEL = Style.EMPTY.dim(); - private static final Style VALUE = Style.EMPTY.fg(Color.WHITE).bold(); + private static final Style VALUE = Style.EMPTY.fg(Theme.baseFg()).bold(); private static final Style GOOD = Style.EMPTY.fg(Color.GREEN); private static final Style BAD = Style.EMPTY.fg(Color.LIGHT_RED); @@ -643,7 +643,7 @@ class MetricsTab extends AbstractTableTab { private static final Style PROM_COMMENT = Style.EMPTY.dim(); private static final Style PROM_NAME = Style.EMPTY.fg(Color.CYAN); - private static final Style PROM_VALUE = Style.EMPTY.fg(Color.WHITE).bold(); + private static final Style PROM_VALUE = Style.EMPTY.fg(Theme.baseFg()).bold(); private static Line colorPrometheusLine(String line) { if (line.startsWith("#")) { diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java index a7fa9520550b..df5714bd4580 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ProcessTab.java @@ -243,7 +243,7 @@ class ProcessTab extends AbstractTab { String padded = String.format(" %-12s", label + ":"); lines.add(Line.from( Span.styled(padded, Style.EMPTY.dim()), - Span.styled(value, Style.EMPTY.fg(Color.WHITE).bold()))); + Span.styled(value, Style.EMPTY.fg(Theme.baseFg()).bold()))); } private static String getProcessUser(String pid) { diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java index e3f64d4401eb..f936d99691d8 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/RoutesTab.java @@ -837,7 +837,7 @@ class RoutesTab extends AbstractTab { if (route != null) { lines.add(Line.from( Span.styled(" Route: ", Theme.label().bold()), - Span.styled(route.routeId, Style.EMPTY.fg(Color.WHITE).bold()))); + Span.styled(route.routeId, Style.EMPTY.fg(Theme.baseFg()).bold()))); lines.add(Line.from( Span.styled(" From: ", Style.EMPTY.dim()), Span.raw(route.from != null ? route.from : ""))); @@ -925,7 +925,7 @@ class RoutesTab extends AbstractTab { lines.add(Line.from(Span.raw(""))); lines.add(Line.from( Span.styled(isInbound ? " To route: " : " From route: ", Style.EMPTY.dim()), - Span.styled(connectedRoute, Style.EMPTY.fg(Color.WHITE)))); + Span.styled(connectedRoute, Style.EMPTY.fg(Theme.baseFg())))); } if (topoNode.exchangesTotal > 0 || topoNode.exchangesFailed > 0) { lines.add(Line.from(Span.raw(""))); @@ -984,7 +984,7 @@ class RoutesTab extends AbstractTab { if (linkedRoute != null && diagram.getRouteLayout(linkedRoute) != null) { lines.add(Line.from( Span.styled(" ↵ ", Theme.label().bold()), - Span.styled(linkedRoute, Style.EMPTY.fg(Color.WHITE)))); + Span.styled(linkedRoute, Style.EMPTY.fg(Theme.baseFg())))); } else if (ln.treeNode != null && ln.treeNode.info.remote) { String arrow = "from".equals(ln.type) ? " external → " : " → external"; lines.add(Line.from( diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java index f8bd50c7c96c..f8eb5ed9ca39 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SpansTab.java @@ -572,7 +572,7 @@ class SpansTab extends AbstractTab { Span.raw(" ".repeat(pad)), Span.styled(durationStr, error ? Style.EMPTY.fg(Color.LIGHT_RED).bold() - : Style.EMPTY.fg(Color.WHITE).bold())); + : Style.EMPTY.fg(Theme.baseFg()).bold())); } private void renderSpanDetail(Frame frame, Rect area, List<WaterfallNode> nodes) { @@ -587,7 +587,7 @@ class SpansTab extends AbstractTab { Style statusStyle = span.isError() ? Style.EMPTY.fg(Color.LIGHT_RED).bold() : Style.EMPTY.fg(Color.GREEN); lines.add(Line.from( Span.styled(" Span: ", Style.EMPTY.dim()), - Span.styled(span.spanId(), Style.EMPTY.fg(Color.WHITE).bold()), + Span.styled(span.spanId(), Style.EMPTY.fg(Theme.baseFg()).bold()), Span.styled(" Parent: ", Style.EMPTY.dim()), Span.raw(span.parentSpanId() != null ? span.parentSpanId() : "-"), Span.styled(" Kind: ", Style.EMPTY.dim()), diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlQueryTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlQueryTab.java index 416064637c7a..656aa87b62aa 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlQueryTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/SqlQueryTab.java @@ -496,7 +496,7 @@ class SqlQueryTab extends AbstractTab { for (String col : columnNames) { Object val = row.get(col); String s = val != null ? String.valueOf(val) : "null"; - Style style = val == null ? Style.EMPTY.fg(Color.DARK_GRAY) : Style.EMPTY.fg(Color.WHITE); + Style style = val == null ? Style.EMPTY.fg(Color.DARK_GRAY) : Style.EMPTY.fg(Theme.baseFg()); cells.add(Cell.from(Span.styled(s, style))); } dataRows.add(Row.from(cells)); diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java index 0e685c2d567c..8e00b74c7aa7 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/StartupTab.java @@ -51,7 +51,7 @@ class StartupTab extends AbstractTab { private static final int MOUSE_SCROLL_LINES = 3; private static final Style LABEL = Style.EMPTY.dim(); - private static final Style VALUE = Style.EMPTY.fg(Color.WHITE).bold(); + private static final Style VALUE = Style.EMPTY.fg(Theme.baseFg()).bold(); private final ScrollbarState scrollbarState = new ScrollbarState(); private final AtomicBoolean loading = new AtomicBoolean(false);
