Skip to content

Commit e4e53fb

Browse files
committed
Fix straight coloring by default
1 parent a2ee7bc commit e4e53fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/hu/akarnokd/jmh/gui/ComparisonTab.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public Component getTableCellRendererComponent(JTable table,
549549
idxj = idx % div;
550550
idx /= div;
551551

552-
boolean reverseColors = cbReverseColors.isSelected();
552+
boolean straightColors = !cbReverseColors.isSelected();
553553

554554
if (!isSelected) {
555555
if (compareIndex >= 0 && idx >= 0 && idx != compareIndex && column >= valueStart) {
@@ -569,16 +569,16 @@ public Component getTableCellRendererComponent(JTable table,
569569
if (c1 != null) {
570570
double ratio = c1 / c0;
571571
if (ratio >= 1 + diff.largeDiff / 100) {
572-
c.setBackground(reverseColors ? diff.largePlus : diff.largeMinus);
572+
c.setBackground(straightColors ? diff.largePlus : diff.largeMinus);
573573
} else
574574
if (ratio <= 1 - diff.largeDiff / 100) {
575-
c.setBackground(reverseColors ? diff.largeMinus : diff.largePlus);
575+
c.setBackground(straightColors ? diff.largeMinus : diff.largePlus);
576576
} else
577577
if (ratio >= 1 + diff.smallDiff / 100) {
578-
c.setBackground(reverseColors ? diff.smallPlus : diff.smallMinus);
578+
c.setBackground(straightColors ? diff.smallPlus : diff.smallMinus);
579579
} else
580580
if (ratio <= 1 - diff.smallDiff / 100) {
581-
c.setBackground(reverseColors ? diff.smallMinus : diff.smallPlus);
581+
c.setBackground(straightColors ? diff.smallMinus : diff.smallPlus);
582582
} else {
583583
c.setBackground(table.getBackground());
584584
}

0 commit comments

Comments
 (0)