Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button Text is not fully shown in Add Note Dialog #8275

Closed
1 task done
amitpanwar789 opened this issue Dec 29, 2023 · 4 comments · Fixed by #8276
Closed
1 task done

Button Text is not fully shown in Add Note Dialog #8275

amitpanwar789 opened this issue Dec 29, 2023 · 4 comments · Fixed by #8276
Assignees
Milestone

Comments

@amitpanwar789
Copy link
Contributor

Describe the bug

I'm encountering a visual issue with the Add Note Dialog window. The button text is not fully shown resulting in an inconsistent and potentially confusing appearance.

Steps to reproduce the behavior

  1. Right click on any request
  2. Select Note options
  3. Now user can see the inconsistency in button text.

Expected behavior

Button text must be fully shown.

Software versions

Zap version 2.14.0

Screenshots

Screenshot from 2023-12-28 15-06-51

Errors from the zap.log file

No response

Additional context

No response

Would you like to help fix this issue?

  • Yes
@thc202 thc202 changed the title Button Text is not fully shown in Add Note Dialog box Button Text is not fully shown in Add Note Dialog Dec 29, 2023
@thc202 thc202 added this to the 2.15.0 milestone Dec 29, 2023
@amitpanwar789
Copy link
Contributor Author

@thc202, I think to set proper size for JButton, we can use getPreferredSize() method like

       `  btnOk.setPreferredSize(btnOk.getPreferredSize());     `                                                              

@kingthorin
Copy link
Member

kingthorin commented Dec 29, 2023

That's just a work around again. In other languages it may not be enough..... It probably really needs a repaint or validate again like the other issue/PR.

@thc202
Copy link
Member

thc202 commented Dec 29, 2023

In this specific case the fix is to remove all hardcoded sizes (no min, max, or preferred needed) and let the layout manager do its job. I will open a PR shortly revamping the layout of the dialog.

@thc202 thc202 self-assigned this Dec 29, 2023
thc202 added a commit to thc202/zaproxy that referenced this issue Dec 29, 2023
Remove hardcoded sizes and let the layout manager position and size the
components, which allows the buttons to show the whole label.

Fix zaproxy#8275.

Signed-off-by: thc202 <thc202@gmail.com>
Copy link

github-actions bot commented Apr 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

3 participants