From aa7c08bfa5fed3514cbe954dce1da712d2a535b2 Mon Sep 17 00:00:00 2001 From: emmanue1 Date: Wed, 5 Aug 2015 07:10:20 +0200 Subject: [PATCH] Adds icon on tabs --- .../jd/gui/view/component/panel/TabbedPanel.groovy | 13 +++++-------- .../fileloader/AbstractFileLoaderProvider.groovy | 6 +++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/src/main/groovy/org/jd/gui/view/component/panel/TabbedPanel.groovy b/app/src/main/groovy/org/jd/gui/view/component/panel/TabbedPanel.groovy index 4b690323..6d8a8b8f 100644 --- a/app/src/main/groovy/org/jd/gui/view/component/panel/TabbedPanel.groovy +++ b/app/src/main/groovy/org/jd/gui/view/component/panel/TabbedPanel.groovy @@ -110,15 +110,10 @@ class TabbedPanel extends JPanel implements PreferencesChangeListener { }) JPanel tab = new JPanel(new BorderLayout()) - if (PlatformService.instance.isMac) { - tab.border = BorderFactory.createEmptyBorder(2, 0, 3, 0) - } else { - tab.border = BorderFactory.createEmptyBorder(1, 0, 1, 0) - } + tab.border = BorderFactory.createEmptyBorder(2, 0, 3, 0) tab.opaque = false tab.toolTipText = tip - // Show label and icon: panel.add(new JLabel(title, icon, JLabel.LEADING), BorderLayout.CENTER) - tab.add(new JLabel(title), BorderLayout.CENTER) + tab.add(new JLabel(title, icon, JLabel.LEADING), BorderLayout.CENTER) tab.add(tabCloseButton, BorderLayout.EAST) ToolTipManager.sharedInstance().unregisterComponent(tab) @@ -189,7 +184,9 @@ class TabbedPanel extends JPanel implements PreferencesChangeListener { int count = tabbedPane.tabCount for (int i=0; i