Skip to content

Commit

Permalink
Merge pull request #5079 from thc202/selenium/scroll-options
Browse files Browse the repository at this point in the history
selenium: add scroll bar to options panel
  • Loading branch information
kingthorin authored Nov 8, 2023
2 parents 3106d15 + 4b923bb commit b88c769
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions addOns/selenium/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Update Selenium to version 4.15.0.

### Fixed
- Add vertical scroll bar to the options panel to prevent the options from being hidden when resizing the Options dialogue (Issue 8178).

## [15.15.0] - 2023-10-12
### Changed
- Update Selenium to version 4.14.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package org.zaproxy.zap.extension.selenium;

import java.awt.BorderLayout;
import java.awt.Dialog;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand All @@ -40,7 +41,9 @@
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.border.TitledBorder;
import org.parosproxy.paros.model.OptionsParam;
import org.parosproxy.paros.view.AbstractParamPanel;
Expand Down Expand Up @@ -326,8 +329,9 @@ public SeleniumOptionsPanel(
browserExtLayout.setVerticalGroup(
browserExtLayout.createSequentialGroup().addComponent(browserExtOptionsPanel));

GroupLayout layout = new GroupLayout(this);
setLayout(layout);
JPanel innerPanel = new JPanel();
GroupLayout layout = new GroupLayout(innerPanel);
innerPanel.setLayout(layout);

layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
Expand All @@ -342,6 +346,13 @@ public SeleniumOptionsPanel(
.addComponent(driversPanel)
.addComponent(binariesPanel)
.addComponent(browserExtPanel));

setLayout(new BorderLayout());
add(
new JScrollPane(
innerPanel,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));
}

private static JPanel createBinaryPanel(
Expand Down Expand Up @@ -664,6 +675,8 @@ public BrowserExtMultipleOptionsPanel(
ResourceBundle resourceBundle) {
super(model, false);
this.resourceBundle = resourceBundle;

getTable().setVisibleRowCount(5);
}

@Override
Expand Down

0 comments on commit b88c769

Please sign in to comment.