Cold style improvement

Changed if query with isVertical in PrimaryScrollBar to short form.
This commit is contained in:
DieGurke 2019-12-15 12:53:01 +01:00
parent cda5c37a4a
commit cf56b2f7ad

View File

@ -83,14 +83,14 @@ public class PrimaryScrollBar extends BasicScrollBarUI{
color = scrollBarColor; color = scrollBarColor;
} }
if (isVertical == true) { if (isVertical) {
g2.setPaint(color); g2.setPaint(color);
g2.fillRoundRect(r.x + 9, r.y, r.width - 10, r.height, arcSize, arcSize); g2.fillRoundRect(r.x + 9, r.y, r.width - 10, r.height, arcSize, arcSize);
g2.setPaint(Settings.getInstance().getThemes().get(Settings.getInstance().getCurrentTheme()).getCellColor()); g2.setPaint(Settings.getInstance().getThemes().get(Settings.getInstance().getCurrentTheme()).getCellColor());
g2.drawRoundRect(r.x + 9, r.y, r.width - 10, r.height, arcSize, arcSize); g2.drawRoundRect(r.x + 9, r.y, r.width - 10, r.height, arcSize, arcSize);
g2.dispose(); g2.dispose();
} }
if (isVertical == false) { if (!isVertical) {
g2.setPaint(color); g2.setPaint(color);
g2.fillRoundRect(r.x, r.y + 9, r.width, r.height - 10, arcSize, arcSize); g2.fillRoundRect(r.x, r.y + 9, r.width, r.height - 10, arcSize, arcSize);
g2.setPaint(Settings.getInstance().getThemes().get(Settings.getInstance().getCurrentTheme()).getCellColor()); g2.setPaint(Settings.getInstance().getThemes().get(Settings.getInstance().getCurrentTheme()).getCellColor());