From bd631d3ec4478d06f0cc5ab06d47a24504d2c166 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Fri, 4 Oct 2024 06:27:15 -0400 Subject: [PATCH] GP-4973: Changing linux default theme from "Nimbus" to "Flat Light" --- .../src/main/java/generic/theme/LafType.java | 19 +++++++------------ .../main/java/generic/theme/ThemeManager.java | 15 +++++---------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/Ghidra/Framework/Gui/src/main/java/generic/theme/LafType.java b/Ghidra/Framework/Gui/src/main/java/generic/theme/LafType.java index e261e524ff..c834d08f2b 100644 --- a/Ghidra/Framework/Gui/src/main/java/generic/theme/LafType.java +++ b/Ghidra/Framework/Gui/src/main/java/generic/theme/LafType.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -153,16 +153,11 @@ public enum LafType { */ public static LafType getDefaultLookAndFeel() { OperatingSystem OS = Platform.CURRENT_PLATFORM.getOperatingSystem(); - switch (OS) { - case MAC_OS_X: - return MAC; - case WINDOWS: - return WINDOWS; - case LINUX: - case UNSUPPORTED: - default: - return NIMBUS; - } + return switch (OS) { + case MAC_OS_X -> MAC; + case WINDOWS -> WINDOWS; + default -> FLAT_LIGHT; + }; } @Override diff --git a/Ghidra/Framework/Gui/src/main/java/generic/theme/ThemeManager.java b/Ghidra/Framework/Gui/src/main/java/generic/theme/ThemeManager.java index 243e762227..8f6f0d8f36 100644 --- a/Ghidra/Framework/Gui/src/main/java/generic/theme/ThemeManager.java +++ b/Ghidra/Framework/Gui/src/main/java/generic/theme/ThemeManager.java @@ -616,16 +616,11 @@ public abstract class ThemeManager { */ public static GTheme getDefaultTheme() { OperatingSystem OS = Platform.CURRENT_PLATFORM.getOperatingSystem(); - switch (OS) { - case MAC_OS_X: - return new MacTheme(); - case WINDOWS: - return new WindowsTheme(); - case LINUX: - case UNSUPPORTED: - default: - return new NimbusTheme(); - } + return switch (OS) { + case MAC_OS_X -> new MacTheme(); + case WINDOWS -> new WindowsTheme(); + default -> new FlatLightTheme(); + }; } /**