diff --git a/src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java b/src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java index 91b01efc..ee2e2007 100644 --- a/src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java +++ b/src/main/java/com/weis/darklaf/ui/combobox/DarkComboBoxUI.java @@ -277,17 +277,16 @@ public class DarkComboBoxUI extends BasicComboBoxUI implements Border { if (comboBox.isEditable()) { var arrowBounds = arrowButton.getBounds(); boolean leftToRight = comboBox.getComponentOrientation().isLeftToRight(); - int off = leftToRight ? arrowBounds.x : arrowBounds.x + arrowBounds.width - 1; + int off = leftToRight ? arrowBounds.x : arrowBounds.x + arrowBounds.width; Area rect; Area iconRect; if (!isTableCellEditor && !isTreeCellEditor) { rect = new Area(new RoundRectangle2D.Double(bSize, bSize, width - 2 * bSize, height - 2 * bSize, arc, arc)); - iconRect = new Area(new Rectangle(off, bSize, width - 2 * bSize - off + 1, - height - 2 * bSize)); + iconRect = new Area(new Rectangle(off, 0, width, height)); } else { rect = new Area(new Rectangle(0, 0, width, height)); - iconRect = new Area(new Rectangle(off, 0, width - off + 1, height)); + iconRect = new Area(new Rectangle(off, 0, width, height)); } if (leftToRight) { rect.intersect(iconRect); diff --git a/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java b/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java index 4d9f9b83..f3ad010d 100644 --- a/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java +++ b/src/main/java/com/weis/darklaf/ui/spinner/DarkSpinnerUI.java @@ -209,10 +209,10 @@ public class DarkSpinnerUI extends BasicSpinnerUI implements PropertyChangeListe final int bSize, final int arc) { var bounds = prevButton.getBounds(); boolean leftToRight = spinner.getComponentOrientation().isLeftToRight(); - int off = leftToRight ? bounds.x + 1 : bounds.x + bounds.width; + int off = leftToRight ? bounds.x : bounds.x + bounds.width; Area rect = new Area(new RoundRectangle2D.Double(bSize, bSize, width - 2 * bSize, height - 2 * bSize, arc, arc)); - Area iconRect = new Area(new Rectangle(off, bSize, width - 2 * bSize - off + 1, height - 2 * bSize)); + Area iconRect = new Area(new Rectangle(off, 0, width, height)); if (leftToRight) { rect.intersect(iconRect); } else {