aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2008-01-15 09:35:24 +0000
committerYana Stamcheva <yana@jitsi.org>2008-01-15 09:35:24 +0000
commit6565a6b045ef92bab75172486d15100b539a589e (patch)
treeaa4f635120cf2b11578a313ddf28f8d55af52322
parentfcbfc1768d7146feeaf3175a027b327a191a70b0 (diff)
downloadjitsi-6565a6b045ef92bab75172486d15100b539a589e.zip
jitsi-6565a6b045ef92bab75172486d15100b539a589e.tar.gz
jitsi-6565a6b045ef92bab75172486d15100b539a589e.tar.bz2
Tabbed Pane arrows get their color from the default look&feel palette.
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneUI.java2
3 files changed, 8 insertions, 7 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
index 5a6359f..369e39e 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommDefaultTheme.java
@@ -213,6 +213,9 @@ public class SIPCommDefaultTheme
"TabbedPane.selected", SELECTION_BACKGROUND,
"TabbedPane.tabAreaInsets", new Insets(2, 2, 0, 6),
"TabbedPane.unselectedBackground", SELECTION_BACKGROUND,
+ "TabbedPane.shadow", CONTROL_SHADOW,
+ "TabbedPane.darkShadow", CONTROL_DARK_SHADOW,
+ "TabbedPane.highlight", CONTROL_COLOR,
"TextField.border", textFieldBorder,
"TextField.margin", new InsetsUIResource(3, 3, 3, 3),
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java
index 65d4e0d..eb358c8 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneEnhancedUI.java
@@ -32,9 +32,7 @@ public class SIPCommTabbedPaneEnhancedUI extends SIPCommTabbedPaneUI {
private static final Color whiteColor = Color.white;
- private static final Color highlightedColor = new Color(249, 117, 10);
-
- private static final int TAB_OVERLAP = 10;
+ private static final int TAB_OVERLAP = 0;
private static final int PREFERRED_WIDTH = 150;
@@ -154,7 +152,7 @@ public class SIPCommTabbedPaneEnhancedUI extends SIPCommTabbedPaneUI {
g2.drawImage(middleImg, x + leftImg.getWidth(), y,
w - leftImg.getWidth() - rightImg.getWidth() + tabOverlap,
leftImg.getHeight(), null);
- g2.drawImage(rightImg, x + w - rightImg.getWidth() + tabOverlap, y, null);
+ g2.drawImage(rightImg, x + w - rightImg.getWidth() + tabOverlap, y, null);
}
protected void paintText(Graphics g, int tabPlacement, Font font,
@@ -188,7 +186,7 @@ public class SIPCommTabbedPaneEnhancedUI extends SIPCommTabbedPaneUI {
title = title.substring(0, title.length() - 4)
.concat("...");
- titleWidth = SwingUtilities.computeStringWidth(metrics, title);
+ titleWidth = SwingUtilities.computeStringWidth(metrics, title);
}
textRect.width = titleWidth;
@@ -206,7 +204,7 @@ public class SIPCommTabbedPaneEnhancedUI extends SIPCommTabbedPaneUI {
g.setColor(whiteColor);
else {
if (this.isTabHighlighted(tabIndex)) {
- g.setColor(highlightedColor);
+ g.setColor(UIManager.getColor("TabbedPane.highlight"));
} else
g.setColor(tabPane.getForegroundAt(tabIndex));
}
diff --git a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneUI.java b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneUI.java
index adf5101..1bccb3d 100644
--- a/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneUI.java
+++ b/src/net/java/sip/communicator/impl/gui/lookandfeel/SIPCommTabbedPaneUI.java
@@ -1452,7 +1452,7 @@ public class SIPCommTabbedPaneUI extends BasicTabbedPaneUI {
if (closeIndexStatus == OVER) {
closeIndexStatus = PRESSED;
- tabScroller.tabPanel.repaint();
+ tabScroller.tabPanel.repaint();
}
else if (maxIndexStatus == OVER) {
maxIndexStatus = PRESSED;