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 f9f55b7c..edf485ee 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 @@ -109,6 +109,7 @@ public class DarkRootPaneUI extends BasicRootPaneUI implements HierarchyListener protected int decorationsStyleFromWindow(final Window window, final int windowDecorationsStyle) { if (windowDecorationsStyle != JRootPane.NONE) return windowDecorationsStyle; + if (DarkUIUtil.isUndecorated(window)) return JRootPane.NONE; if (window instanceof JFrame) return JRootPane.FRAME; if (window instanceof JDialog) return JRootPane.PLAIN_DIALOG; return windowDecorationsStyle; diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java b/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java index 157587ae..3f5c2f25 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/table/DarkTableCellEditor.java @@ -194,7 +194,7 @@ public class DarkTableCellEditor extends DefaultCellEditor { if (anEvent instanceof KeyEvent) { if (DarkTableUI.ignoreKeyCodeOnEdit((KeyEvent) anEvent, table)) return false; } - if (DarkTableCellRenderer.isBooleanRenderingEnabled(table) && anEvent instanceof MouseEvent) { + if (anEvent instanceof MouseEvent && DarkTableCellRenderer.isBooleanRenderingEnabled(table)) { Point p = ((MouseEvent) anEvent).getPoint(); int row = table.rowAtPoint(p); int col = table.columnAtPoint(p); @@ -206,6 +206,7 @@ public class DarkTableCellEditor extends DefaultCellEditor { p.y -= rect.y; Component editor = getBooleanEditor(table).getTableCellEditorComponent(table, true, false, row, col); + editor.setBounds(rect); return editor.contains(p); } } diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/radiobutton/DarkRadioButtonUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/radiobutton/DarkRadioButtonUI.java index f2c06565..1658f6bc 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/radiobutton/DarkRadioButtonUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/radiobutton/DarkRadioButtonUI.java @@ -252,8 +252,8 @@ public class DarkRadioButtonUI extends MetalRadioButtonUI implements PropertyCha @Override public boolean contains(final JComponent c, final int x, final int y) { - if (hitArea == null || (hitArea.isEmpty() && c instanceof JRadioButton)) { - layout((JRadioButton) c, c.getFontMetrics(c.getFont())); + if (hitArea == null || (hitArea.isEmpty()) && c instanceof JToggleButton) { + layout((JToggleButton) c, c.getFontMetrics(c.getFont())); } return hitArea.contains(x, y); } diff --git a/core/src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java b/core/src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java index 48d3c0aa..f9ab838f 100644 --- a/core/src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java +++ b/core/src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java @@ -374,4 +374,13 @@ public final class DarkUIUtil { return false; } } + + public static boolean isUndecorated(final Window window) { + if (window instanceof Frame) { + return ((Frame) window).isUndecorated(); + } else if (window instanceof Dialog) { + return ((Dialog) window).isUndecorated(); + } + return false; + } }