- Allows to set color constants for about window and the splash screen

- Slightly changes the about window and the splash screen backgrounds
cusax-fix
Yana Stamcheva 18 years ago
parent d6230b577e
commit d2b70d1d19

@ -101,10 +101,10 @@ gradientLightColor=FFFFFF
borderColor=8EA0BC
# Splash screen text color.
splashScreenTextColor=FFFFFF
splashScreenTextColor=333333
# Splash screen title color.
splashScreenTitleColor=EAEAEA
splashScreenTitleColor=375684
# Background color for the contact list background.
contactListBackground=FFFFFF

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@ -63,7 +63,7 @@ public AboutWindow(Frame owner)
this.titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.versionLabel.setFont(Constants.FONT.deriveFont(Font.BOLD, 18));
this.versionLabel.setForeground(Color.GRAY);
this.versionLabel.setForeground(Constants.TITLE_COLOR);
this.versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.logoArea.setFont(Constants.FONT.deriveFont(Font.BOLD, 14));
@ -78,7 +78,8 @@ public AboutWindow(Frame owner)
this.rightsArea.setContentType("text/html");
this.rightsArea.appendToEnd(Resources.getString("copyright"));
this.rightsArea.appendToEnd(Resources.getString("copyright",
new String[]{Constants.TEXT_COLOR}));
this.rightsArea.setPreferredSize(new Dimension(50, 20));
this.rightsArea
@ -89,11 +90,12 @@ public AboutWindow(Frame owner)
this.rightsArea.addHyperlinkListener(this);
this.licenseArea.setContentType("text/html");
this.licenseArea.appendToEnd(Resources.getString("license"));
this.licenseArea.appendToEnd(Resources.getString("license",
new String[]{Constants.TEXT_COLOR}));
this.licenseArea.setPreferredSize(new Dimension(50, 20));
this.licenseArea.setBorder(BorderFactory.createEmptyBorder(10, 180, 0,
0));
this.licenseArea.setBorder(
BorderFactory.createEmptyBorder(10, 180, 0, 0));
this.licenseArea.setOpaque(false);
this.licenseArea.setEditable(false);
this.licenseArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
@ -167,9 +169,9 @@ protected void paintComponent(Graphics g)
g2.drawImage(bgImage, 0, 0, null);
g2.setColor(new Color(255, 255, 255, 100));
g2.fillRect(0, 0, getWidth(), getHeight());
// g2.setColor(new Color(255, 255, 255, 100));
//
// g2.fillRect(0, 0, getWidth(), getHeight());
}
}

@ -27,10 +27,18 @@ public class Constants
*/
/**
* Dark blue color used in the About Window.
* Dark blue color used in the about window and the splash screen.
*/
public static final Color TITLE_COLOR
= new Color(Resources.getColor("controlDarkShadow"));
= new Color(Integer.parseInt(
Resources.getColor("splashScreenTitleColor"), 16));
/**
* Text color used in the about window and the splash screen.
*/
public static final String TEXT_COLOR
= Resources.getColor("splashScreenTextColor");
/*
* ======================================================================

@ -89,17 +89,17 @@ public static String getString(String key, String[] params)
*
* @return An internationalized string corresponding to the given key.
*/
public static int getColor(String key)
public static String getColor(String key)
{
try
{
return Integer.parseInt(COLOR_RESOURCE_BUNDLE.getString(key), 16);
return COLOR_RESOURCE_BUNDLE.getString(key);
}
catch (MissingResourceException e)
{
log.error("Missing color resource.", e);
return 0xFFFFFF;
return "FFFFFF";
}
}
}

@ -51,42 +51,44 @@ public WelcomeWindow()
this.titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.versionLabel.setFont(Constants.FONT.deriveFont(Font.BOLD, 18));
this.versionLabel.setForeground(Color.GRAY);
this.versionLabel.setForeground(Constants.TITLE_COLOR);
this.versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.logoArea.setFont(Constants.FONT.deriveFont(Font.BOLD, 12));
this.logoArea.setForeground(Constants.TITLE_COLOR);
this.logoArea.setFont(Constants.FONT.deriveFont(Font.BOLD, 12));
this.logoArea.setOpaque(false);
this.logoArea.setLineWrap(true);
this.logoArea.setWrapStyleWord(true);
this.logoArea.setEditable(false);
this.logoArea.setPreferredSize(new Dimension(100, 20));
this.logoArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.logoArea.setBorder(BorderFactory.createEmptyBorder(20, 180, 0, 0));
this.logoArea.setBorder(BorderFactory.createEmptyBorder(20, 190, 0, 0));
this.rightsArea.setContentType("text/html");
this.rightsArea.appendToEnd(Resources.getString("welcomeMessage",
new String[]{
Constants.TEXT_COLOR,
BrandingResources.getApplicationString("productName"),
BrandingResources.getApplicationString("productWebSite")}));
BrandingResources.getApplicationString("productWebSite")
}));
this.rightsArea.setPreferredSize(new Dimension(50, 50));
this.rightsArea
.setBorder(BorderFactory.createEmptyBorder(0, 180, 0, 0));
.setBorder(BorderFactory.createEmptyBorder(0, 190, 0, 0));
this.rightsArea.setOpaque(false);
this.rightsArea.setEditable(false);
this.rightsArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
this.licenseArea.setContentType("text/html");
this.licenseArea.appendToEnd(Resources.getString("license", new String[]
{
"<a href=http://sip-communicator.org>"
+ "http://sip-communicator.org</a>"
}));
this.licenseArea.appendToEnd(Resources.getString("license",
new String[]
{
Constants.TEXT_COLOR
}));
this.licenseArea.setPreferredSize(new Dimension(50, 20));
this.licenseArea.setBorder(BorderFactory
.createEmptyBorder(0, 180, 0, 0));
.createEmptyBorder(0, 190, 0, 0));
this.licenseArea.setOpaque(false);
this.licenseArea.setEditable(false);
this.licenseArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
@ -201,9 +203,9 @@ protected void paintComponent(Graphics g)
g2.drawImage(bgImage, 0, 0, null);
g2.setColor(new Color(255, 255, 255, 170));
g2.fillRect(0, 0, getWidth(), getHeight());
// g2.setColor(new Color(255, 255, 255, 170));
//
// g2.fillRect(0, 0, getWidth(), getHeight());
g2.setColor(new Color(150, 150, 150));

@ -4,13 +4,13 @@ loading=Loading
aboutMenuEntry=About
ok=OK
basedOn=based on
welcomeMessage=<DIV id=\"message\">The {0} is currently under active development. \
welcomeMessage=<DIV color={0}>The {1} is currently under active development. \
The version you are running is only experimental and MAY NOT \
work as expected. Please refer to {1} for more information.</DIV>
copyright=<DIV id=\"message\"><font size=3>(c)2003-2007 Copyright \
work as expected. Please refer to {2} for more information.</DIV>
copyright=<DIV><font size=3 color={0}>(c)2003-2007 Copyright \
<b>sip-communicator.org</b>. All rights reserved. Visit \
<a href="http://sip-communicator.org">http://sip-communicator.org</a>.\
</font></DIV>
license=<DIV id=\"message\">The <b>SIP Communicator</b> is distributed under \
license=<DIV color={0}>The <b>SIP Communicator</b> is distributed under \
the terms of the LGPL (<a href=\"http://www.gnu.org\">\
http://www.gnu.org</a>).</DIV>
Loading…
Cancel
Save