OCR-Form-Tools icon indicating copy to clipboard operation
OCR-Form-Tools copied to clipboard

Electron improvements for macOS

Open iMicknl opened this issue 3 years ago • 0 comments

After using FoTT on macOS, I faced some minor issues and decided to dive into the source and make some modifications.

Changes

  • Enable webSecurity, as mentioned in Do Not Disable WebSecurity on the Electron security checklist. It should not be required for CORS anymore, but I need to test this a bit more extensively.

  • Open external links (for example documentation) in the default browser, instead of in an Electron window where interaction is limited.

  • Command + Q to quit an app was not working on macOS, due to a faulty menu item configuration. I did revert back to the default menu items offered by Electron, since there weren't any modifications in the FoTT configuration.

  • Set the productName and appName to 'Form OCR Testing Tool'

  • Added maximize / minimize on double click on custom titleBar. (see https://github.com/electron/fiddle/pull/156). Centered the macOS controls.

Before

Screenshot 2020-11-15 at 16 22 26 Screenshot 2020-11-15 at 17 21 20 (native macOS controls not centered)

After

Screenshot 2020-11-15 at 16 12 54 Screenshot 2020-11-15 at 16 13 04 Screenshot 2020-11-15 at 17 30 55 (native macOS controls centered)

Tested

  • [x] Tested on macOS
  • [ ] Tested on Windows

iMicknl avatar Nov 15 '20 15:11 iMicknl