/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 * 
 * Distributable under LGPL license. See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.gui.lookandfeel;

import java.awt.*;

import javax.swing.*;
import javax.swing.plaf.*;
import javax.swing.plaf.basic.*;

import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;

/**
 * The SIPCommMenuUI implementation.
 * 
 * @author Yana Stamcheva
 */
public class SIPCommStatusMenuUI
    extends BasicMenuUI
{
    /**
     * Creates a new SIPCommMenuUI instance.
     */
    public static ComponentUI createUI(JComponent x)
    {
        return new SIPCommStatusMenuUI();
    }

    public void paint(Graphics g, JComponent c)
    {
        AntialiasingManager.activateAntialiasing(g);
        super.paint(g, c);
    }

    /**
     * Draws the background of the menu.
     * 
     * @param g the paint graphics
     * @param menuItem menu item to be painted
     * @param bgColor selection background color
     * @since 1.4
     */
    protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
    {
        AntialiasingManager.activateAntialiasing(g);

        Color oldColor = g.getColor();

        int menuWidth = menuItem.getWidth();
        int menuHeight = menuItem.getHeight();

        Color newBgColor = new Color(
            GuiActivator.getResources()
                .getColor("accountRegistrationBackground"));

        if (menuItem.isSelected())
        {
            g.setColor(Color.LIGHT_GRAY);
            g.fillRoundRect(0, 0, menuWidth, menuHeight, 8, 8);
        }
        else
        {
            g.setColor(newBgColor);
            g.fillRect(0, 0, menuWidth, menuHeight);
        }

        g.setColor(oldColor);
    }
}

@@ -1476,24 +1476,106 @@
 ground%22));%0A%0A
+        g.setColor(newBgColor);%0A        g.fillRect(0, 0, menuWidth, menuHeight);%0A%0A
         if (
@@ -1726,130 +1726,8 @@
    %7D
-%0A        else%0A        %7B%0A            g.setColor(newBgColor);%0A            g.fillRect(0, 0, menuWidth, menuHeight);%0A        %7D
 %0A%0A  

Fix white corners of presence status selector box on Windows and Linux.