diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-12-08 20:52:34 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-12-08 20:52:34 +0000 |
commit | c44db17d26c3234e29fbbd35999578ba35c03a38 (patch) | |
tree | a6dda66d78c219356b5a6a80aa1aec937c44179a /src/net/java/sip/communicator/plugin/branding | |
parent | a1e6ed8629cbc8b5ce8b4f7b83ac5efc14da9eca (diff) | |
download | jitsi-c44db17d26c3234e29fbbd35999578ba35c03a38.zip jitsi-c44db17d26c3234e29fbbd35999578ba35c03a38.tar.gz jitsi-c44db17d26c3234e29fbbd35999578ba35c03a38.tar.bz2 |
Fixes the background of the Help > About window which does not fill the entire window on Windows and has "white" borders on the left and bottom.
Diffstat (limited to 'src/net/java/sip/communicator/plugin/branding')
-rw-r--r-- | src/net/java/sip/communicator/plugin/branding/AboutWindow.java | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/net/java/sip/communicator/plugin/branding/AboutWindow.java b/src/net/java/sip/communicator/plugin/branding/AboutWindow.java index 3902bf6..3a183d5 100644 --- a/src/net/java/sip/communicator/plugin/branding/AboutWindow.java +++ b/src/net/java/sip/communicator/plugin/branding/AboutWindow.java @@ -30,6 +30,7 @@ import org.osgi.framework.*; *
* @author Yana Stamcheva
* @author Adam Netocny
+ * @author Lyubomir Marinov
*/
public class AboutWindow
extends JDialog
@@ -63,6 +64,7 @@ public class AboutWindow */
aboutWindow.addWindowListener(new WindowAdapter()
{
+ @Override
public void windowClosed(WindowEvent e)
{
if (aboutWindow == e.getWindow())
@@ -250,8 +252,8 @@ public class AboutWindow extends JPanel
implements Skinnable
{
- private final Logger logger =
- Logger.getLogger(WindowBackground.class.getName());
+ private static final Logger logger
+ = Logger.getLogger(WindowBackground.class);
private Image bgImage = null;
@@ -280,6 +282,7 @@ public class AboutWindow }
}
+ @Override
protected void paintComponent(Graphics g)
{
super.paintComponent(g);
@@ -289,7 +292,24 @@ public class AboutWindow {
AntialiasingManager.activateAntialiasing(g);
- g.drawImage(bgImage, 0, 0, null);
+ int bgImageWidth = bgImage.getWidth(null);
+ int bgImageHeight = bgImage.getHeight(null);
+ boolean bgImageHasBeenDrawn = false;
+
+ if ((bgImageWidth != -1) && (bgImageHeight != -1))
+ {
+ int width = getWidth();
+ int height = getHeight();
+
+ if ((bgImageWidth < width) || (bgImageHeight < height))
+ {
+ g.drawImage(bgImage, 0, 0, width, height, null);
+ bgImageHasBeenDrawn = true;
+ }
+ }
+
+ if (!bgImageHasBeenDrawn)
+ g.drawImage(bgImage, 0, 0, null);
}
finally
{
@@ -318,7 +338,6 @@ public class AboutWindow .getBundleContext().getService(serviceReference);
browserLauncherService.openURL(href);
-
}
}
}
@@ -406,7 +425,7 @@ public class AboutWindow if (showApplicationNameProp != null
&& showApplicationNameProp.length() > 0)
{
- return new Boolean(showApplicationNameProp).booleanValue();
+ return Boolean.parseBoolean(showApplicationNameProp);
}
return true;
|