proxyman-windows-linux icon indicating copy to clipboard operation
proxyman-windows-linux copied to clipboard

[BUG] Broken UI with large font size

Open NghiaTranUIT opened this issue 1 year ago • 0 comments

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

  1. Open Proxyman Window -> Setting -> Appearance Tab
  2. Change font size to 20

Current Behavior

  • Row height doesn't update -> Looks really bad

Screenshot 2024-02-21 at 15 45 58

Expected Behavior

  • Like as macOS:
Screenshot 2024-02-21 at 15 54 39
  • 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 best height.
    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

  1. Open Proxyman Window -> Setting -> Appearance Tab
  2. Change font size to 20
  3. Open Raw Tab on the Request
  4. Back to Appearance Tab -> Restore

Current Behavior

  • Raw Tab size doesn't update Screenshot 2024-02-21 at 15 46 08

Expected Behavior

  • Raw Tab, Header Tab, Body Tab should be update with the new change

NghiaTranUIT avatar Feb 21 '24 09:02 NghiaTranUIT