proxyman-windows-linux
proxyman-windows-linux copied to clipboard
[BUG] Broken UI with large font size
Description
There are 2 UI bugs when updating a Font Size
Video:
https://github.com/ProxymanApp/proxyman-windows-linux/assets/5878421/23ecfb11-f79a-45d5-b1f9-3ea473db600b
Bug 1: Row Height doesn't update with the font size
Steps to Reproduce
- Open Proxyman Window -> Setting -> Appearance Tab
- Change font size to 20
Current Behavior
- Row height doesn't update -> Looks really bad
Expected Behavior
- Like as macOS:
- No need to dynamically calculate the row height for each row, because it's really expensive. Try to write a simple hack to get a look-good height, depending on the current font size. For instance, here is how the macOS does:
- Please modify this func, to find a
bestheight.
func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat {
// Little hack to calculate the size that fit the content
let height = 22 + (fontSize - 11) * 2
return CGFloat(height)
}
Bug 2: Row Height doesn't update with the font size
Steps to Reproduce
- Open Proxyman Window -> Setting -> Appearance Tab
- Change font size to 20
- Open Raw Tab on the Request
- Back to Appearance Tab -> Restore
Current Behavior
- Raw Tab size doesn't update
Expected Behavior
- Raw Tab, Header Tab, Body Tab should be update with the new change