espresso3389 / pdfrx

pdfrx is yet another PDF viewer implementation that built on the top of pdfium. The plugin currently supports Android, iOS, Windows, macOS, Linux, and Web.
MIT License
60 stars 36 forks source link

pagePaintCallbacks - add your own color #142

Closed Sikman closed 3 weeks ago

Sikman commented 3 weeks ago

Hi there,

I would like to add my own custom color for the matches inside of the PDF - the highlight color. Is that possible, or will be?

espresso3389 commented 3 weeks ago

Good suggestion. It should be customizable. No, it must be. Currently the colors are hard-coded I should work for the update.

espresso3389 commented 3 weeks ago

On f002590, I've added matchTextColor/activeMatchTextColor:

https://github.com/espresso3389/pdfrx/blob/master/lib/src/widgets/pdf_viewer_params.dart#L146-L152

@Sikman Do you need more customizability?

espresso3389 commented 3 weeks ago

Anyway, 1.0.57 contains the fix above.

Sikman commented 3 weeks ago

Awesome! I will try it. Thanks a lot

Sikman commented 3 weeks ago

@espresso3389 Works like a charm! 👍 Well done. Very useful feature