Skip to content

Commit

Permalink
Fix row color in new Burp UI issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Apr 1, 2021
1 parent 20772f5 commit 152e628
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sourceSets {
gversion {
srcDir = "src" // path is relative to the sub-project by default

version = "1.1.0"
version = "1.1.1"
classPackage = "burp.version"
className = "MultiplayerVersion" // optional. If not specified GVersion is used
dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'" // optional. This is the default
Expand Down
2 changes: 1 addition & 1 deletion src/burp/HTTPHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public Color getColorForId(String id) {
case Green:
return Color.GREEN;
}
return javax.swing.UIManager.getColor("Table.dropCellForeground");
return null; // javax.swing.UIManager.getColor("Table.dropCellForeground");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/burp/gui/InScopePanel.form
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</Property>
</Properties>
<AuxValues>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTable(this.multiplayer.history) {&#xa; public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {&#xa; Component component = super.prepareRenderer(renderer, row, column);&#xa; JComponent jComponent = (JComponent) component;&#xa;&#xa; // Handle row colors&#xa; String id = (String) this.getValueAt(row, 0);&#xa; Color backgroundColor = multiplayer.history.getColorForId(id);&#xa; if(!component.getBackground().equals(getSelectionBackground())) {&#xa; component.setBackground(backgroundColor);&#xa; }&#xa;&#xa; // Handle column width&#xa; int rendererWidth = component.getPreferredSize().width;&#xa; TableColumn tableColumn = getColumnModel().getColumn(column);&#xa; tableColumn.setPreferredWidth(Math.max(rendererWidth + getIntercellSpacing().width, tableColumn.getPreferredWidth()));&#xa;&#xa; return component;&#xa; }&#xa;}"/>
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new javax.swing.JTable(this.multiplayer.history) {&#xa; public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {&#xa; Component component = super.prepareRenderer(renderer, row, column);&#xa; JComponent jComponent = (JComponent) component;&#xa;&#xa; // Handle row colors&#xa; String id = (String) this.getValueAt(row, 0);&#xa; Color backgroundColor = multiplayer.history.getColorForId(id);&#xa; if (!component.getBackground().equals(getSelectionBackground())) {&#xa; component.setBackground(backgroundColor);&#xa; }&#xa;&#xa; // Handle column width&#xa; int rendererWidth = component.getPreferredSize().width;&#xa; TableColumn tableColumn = getColumnModel().getColumn(column);&#xa; tableColumn.setPreferredWidth(Math.max(rendererWidth + getIntercellSpacing().width, tableColumn.getPreferredWidth()));&#xa;&#xa; return component;&#xa; }&#xa;}"/>
</AuxValues>
</Component>
</SubComponents>
Expand Down
2 changes: 1 addition & 1 deletion src/burp/gui/InScopePanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public Component prepareRenderer(TableCellRenderer renderer, int row, int column
// Handle row colors
String id = (String) this.getValueAt(row, 0);
Color backgroundColor = multiplayer.history.getColorForId(id);
if(!component.getBackground().equals(getSelectionBackground())) {
if (!component.getBackground().equals(getSelectionBackground())) {
component.setBackground(backgroundColor);
}

Expand Down

0 comments on commit 152e628

Please sign in to comment.