PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[Hosts] Improve Resizing behavior

Open htcfreek opened this issue 1 year ago • 4 comments

Summary of the Pull Request

The old ui definition causes the host names column to hid. Now it is not hiding anymore and the Address column has a smaller min width.

Resizing

Before: Screenshot_20240509-205052_GitHub.jpg

After: hosts_ui_resizing

Alignment on small window with correct resizing behavior

Before: image

After: image

PR Checklist

  • [x] Closes: #32704
  • [x] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • [x] Tests: Added/updated and all pass
  • [ ] Localization: All end user facing strings can be localized
  • [ ] Dev docs: Added/updated
  • [ ] New binaries: Added on the required places
  • [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

  • Set min width for the first two columns.
  • Updated the min width of he window that the last columns not hiding on resizing.
  • Set fixed column width for the icons of the entries to have them vertical aligned.
  • Fixed the bug that the icons and buttons can get misaligned on resizing. Screenshot_20240509-204221_GitHub.jpg

Validation Steps Performed

Manual tests.

htcfreek avatar May 09 '24 09:05 htcfreek

@davidegiacometti If you like to have the ping & duplicate icons centered instead of vertical aligned please tell me. Then we can change the width properties back to Auto.

htcfreek avatar May 09 '24 10:05 htcfreek

Don't like the IPv6 being wrapped but I think this is an improvement.

@davidegiacometti It is wrapped because I made the column size smaller as requested in the issue. Making ut bigger again would require a higher min window size, because resizing the window otherwise hides the buttons.

htcfreek avatar May 10 '24 11:05 htcfreek

@davidegiacometti I made some changes based on your feedback. This is how it looks now. Are you okay with it? image

The windows shows in the default open size and is not resized.

htcfreek avatar May 10 '24 11:05 htcfreek

Looks better! I will test and review the changes.

davidegiacometti avatar May 10 '24 11:05 davidegiacometti

@jaimecbernardo You can merge this. I don't have the permission for merging.

htcfreek avatar May 30 '24 15:05 htcfreek