SetOpaque performance fix
Apparently, the setOpaque method on JPanels was causing some performance issues on the client, the original reason I had these was so that the base panel would have a color defined, and every container or wrapper panel on top would just be transparent. To fix this I have set a default JPanel background color and replaced calls to setOpaque with calls to setBackground with the appropriate colors.
This commit is contained in:
@@ -62,6 +62,7 @@ import javax.swing.UnsupportedLookAndFeelException;
|
||||
import static javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE;
|
||||
import javax.swing.plaf.FontUIResource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.client.ui.ColorScheme;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import net.runelite.client.ui.components.CustomScrollBarUI;
|
||||
import org.pushingpixels.substance.internal.SubstanceSynapse;
|
||||
@@ -87,6 +88,7 @@ public class SwingUtil
|
||||
|
||||
UIManager.put("Button.foreground", Color.WHITE);
|
||||
UIManager.put("MenuItem.foreground", Color.WHITE);
|
||||
UIManager.put("Panel.background", ColorScheme.DARK_GRAY_COLOR);
|
||||
UIManager.put("ScrollBarUI", CustomScrollBarUI.class.getName());
|
||||
|
||||
// Do not render shadows under popups/tooltips.
|
||||
|
||||
Reference in New Issue
Block a user