From 13b5f3f8192c64570314703e1e81ad2f89e556c0 Mon Sep 17 00:00:00 2001 From: weisj Date: Tue, 10 Mar 2020 19:37:16 +0100 Subject: [PATCH] Improved padding for more tabs button. --- .../github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java b/core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java index 872d9b2f..5fc7d8dd 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/MoreTabsButton.java @@ -58,7 +58,7 @@ public class MoreTabsButton extends DarkTabAreaButton { FontMetrics metrics = g.getFontMetrics(); String label = getLabelString(); int labelWidth = metrics.stringWidth(label); - int x = (getWidth() - (icon.getIconWidth() + labelWidth + pad)) / 2 + pad; + int x = (getWidth() - (icon.getIconWidth() + labelWidth + pad)) / 2; int y = (getHeight() - icon.getIconHeight()) / 2; @@ -93,7 +93,7 @@ public class MoreTabsButton extends DarkTabAreaButton { public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); FontMetrics metrics = getFontMetrics(getFont()); - size.width += metrics.stringWidth(getLabelString()) + 3 * pad; + size.width += metrics.stringWidth(getLabelString()) + 4 * pad; return size; } }