Skip to content

Commit

Permalink
Fix fill color not respecting border offset
Browse files Browse the repository at this point in the history
fix issue #175
  • Loading branch information
RoanH committed May 24, 2021
1 parent ee53b35 commit a9dc0c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions KeysPerSecond/src/me/roan/kps/panels/BasePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ public void paintComponent(Graphics g1){

if(isActive()){
g.setColor(ColorManager.activeColor);
g.fillRect(2 + (imageSize / 4) * 3,
2 + (imageSize / 4) * 2,
this.getWidth() - 5 - (imageSize / 4) * 5,
this.getHeight() - 4 - (imageSize / 4) * 4);
g.fillRect(
Main.config.borderOffset + (imageSize / 4) * 3,
Main.config.borderOffset + (imageSize / 4) * 2,
this.getWidth() - 2 * Main.config.borderOffset - (imageSize / 4) * 6,
this.getHeight() - 2 * Main.config.borderOffset - (imageSize / 4) * 4
);
g.setColor(Main.config.getBackgroundColor());
}else{
g.setColor(Main.config.getForegroundColor());
Expand Down

0 comments on commit a9dc0c9

Please sign in to comment.