diff --git a/core/src/main/java/com/github/weisj/darklaf/LafManager.java b/core/src/main/java/com/github/weisj/darklaf/LafManager.java index 380f5cee..ce1b0522 100644 --- a/core/src/main/java/com/github/weisj/darklaf/LafManager.java +++ b/core/src/main/java/com/github/weisj/darklaf/LafManager.java @@ -43,6 +43,7 @@ import com.github.weisj.darklaf.theme.event.*; import com.github.weisj.darklaf.theme.info.DefaultThemeProvider; import com.github.weisj.darklaf.theme.info.PreferredThemeStyle; import com.github.weisj.darklaf.theme.info.ThemeProvider; +import com.github.weisj.darklaf.theme.laf.ThemedLookAndFeel; import com.github.weisj.darklaf.util.LogUtil; /** @@ -320,7 +321,7 @@ public final class LafManager { * @return true if installed. */ public static boolean isInstalled() { - return theme != null && UIManager.getLookAndFeel() instanceof DarkLaf; + return theme != null && UIManager.getLookAndFeel() instanceof ThemedLookAndFeel; } /** @@ -374,7 +375,7 @@ public final class LafManager { * @param theme the theme to install. */ public static void installTheme(final Theme theme) { - if (theme == getTheme() && UIManager.getLookAndFeel() instanceof DarkLaf) return; + if (theme == getTheme() && UIManager.getLookAndFeel() instanceof ThemedLookAndFeel) return; setTheme(theme); install(); } diff --git a/core/src/main/java/com/github/weisj/darklaf/components/border/DarkLineBorder.java b/core/src/main/java/com/github/weisj/darklaf/components/border/DarkLineBorder.java index 851bae0d..129b52a3 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/border/DarkLineBorder.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/border/DarkLineBorder.java @@ -29,9 +29,9 @@ import java.util.function.Function; import javax.swing.*; -import com.github.weisj.darklaf.DarkLaf; import com.github.weisj.darklaf.LafManager; import com.github.weisj.darklaf.theme.Theme; +import com.github.weisj.darklaf.theme.laf.ThemedLookAndFeel; public class DarkLineBorder extends MutableLineBorder { @@ -57,7 +57,7 @@ public class DarkLineBorder extends MutableLineBorder { } protected Color getColor(final Component c) { - if (!(UIManager.getLookAndFeel() instanceof DarkLaf)) { + if (!(UIManager.getLookAndFeel() instanceof ThemedLookAndFeel)) { currentTheme = null; Color bg = c.getBackground(); return bg != null ? fallbackSupplier.apply(bg) : null; diff --git a/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java b/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java index 6be8a74b..1f9c9588 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBox.java @@ -30,7 +30,7 @@ import java.awt.event.*; import javax.swing.*; import javax.swing.event.ChangeListener; -import com.github.weisj.darklaf.DarkLaf; +import com.github.weisj.darklaf.theme.laf.ThemedLookAndFeel; public class TristateCheckBox extends JCheckBox { private final ChangeListener enableListener = e -> TristateCheckBox.this.setFocusable(getModel().isEnabled()); @@ -59,7 +59,7 @@ public class TristateCheckBox extends JCheckBox { } public String getUIClassID() { - if (UIManager.getLookAndFeel() instanceof DarkLaf) { + if (UIManager.getLookAndFeel() instanceof ThemedLookAndFeel) { return "TristateCheckBoxUI"; } else { return super.getUIClassID(); diff --git a/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBoxMenuItem.java b/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBoxMenuItem.java index f94ba1ae..39d466b9 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBoxMenuItem.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/tristate/TristateCheckBoxMenuItem.java @@ -32,7 +32,7 @@ import java.awt.event.MouseEvent; import javax.swing.*; -import com.github.weisj.darklaf.DarkLaf; +import com.github.weisj.darklaf.theme.laf.ThemedLookAndFeel; public class TristateCheckBoxMenuItem extends JCheckBoxMenuItem { @@ -112,7 +112,7 @@ public class TristateCheckBoxMenuItem extends JCheckBoxMenuItem { } public String getUIClassID() { - if (UIManager.getLookAndFeel() instanceof DarkLaf) { + if (UIManager.getLookAndFeel() instanceof ThemedLookAndFeel) { return "TristateCheckBoxMenuItemUI"; } else { return super.getUIClassID(); diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java index 54678f7f..240b25e4 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkRootPaneUI.java @@ -33,10 +33,10 @@ import javax.swing.*; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicRootPaneUI; -import com.github.weisj.darklaf.DarkLaf; import com.github.weisj.darklaf.LafManager; import com.github.weisj.darklaf.platform.DecorationsHandler; import com.github.weisj.darklaf.platform.decorations.CustomTitlePane; +import com.github.weisj.darklaf.theme.laf.ThemedLookAndFeel; import com.github.weisj.darklaf.util.DarkUIUtil; import com.github.weisj.darklaf.util.PropertyKey; import com.github.weisj.darklaf.util.PropertyUtil; @@ -131,7 +131,7 @@ public class DarkRootPaneUI extends BasicRootPaneUI implements HierarchyListener uninstallBorder(root); root.removeHierarchyListener(this); if (titlePane != null) { - boolean removeDecorations = !(UIManager.getLookAndFeel() instanceof DarkLaf) + boolean removeDecorations = !(UIManager.getLookAndFeel() instanceof ThemedLookAndFeel) || !LafManager.isDecorationsEnabled(); titlePane.uninstall(removeDecorations); setTitlePane(root, null); diff --git a/core/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java b/core/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java index 7beee837..47e840a1 100644 --- a/core/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java +++ b/core/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java @@ -347,9 +347,6 @@ public class DarkHighlightPainter extends DefaultHighlighter.DefaultHighlightPai boolean arcBottomRight = nextLineVisible && !roundedBottomRight && rightArcVisible(currentLineRect, nextLineRect); - System.out.println(selectionStart + " " + selectionEnd); - System.out.println(posOffs0 + " " + posOffs1); - layerRect = paintRoundRect(g, context, layerRect, canRoundLeft && roundedTopLeft, canRoundRight && roundedTopRight,