bksubhuti / tipitaka-pali-reader

A Pali Reading app made in Flutter
21 stars 5 forks source link

Search Highlight and click highlight #234

Closed bksubhuti closed 7 months ago

bksubhuti commented 7 months ago

The the naming of things is wrong.. we need a code clean up.. But.. here is the issue.. text backgroundColorChange on search keywords. I want underline on word click. I want the changes to go back to normal when the changed text (dictionary click or search term) is clicked..

If text background is changed, then it should go back to no - effect when the word is clicked again. That behavior is there now..

Ven pndazza did some work to have two types of text-decoration changes..(or he added one extra item).

  r'class = "underlined_highlight"': r'style="font-weight: 500; color: ' +
      colorHex +
      '; text-decoration: underline; text-decoration-color: ' +
      colorHex +
      ';"'

and there is also code here (the old code which probably undoes the decoration when clicked)

That code is here return { 'color': 'inherit', // Uses the default text color 'background-color': colorHex, // Highlights the text with colorHex //'font-weight': '500', // Sets the font weight to 500 'text-decoration': 'underline', // Underlines the text 'text-decoration-color': colorHex, // Sets underline color to match colorHex };

https://github.com/bksubhuti/tipitaka-pali-reader/assets/18184280/85f6e63e-4063-475d-915b-7ce620d72ce8

bksubhuti commented 7 months ago

https://github.com/bksubhuti/tipitaka-pali-reader/assets/18184280/8441e472-4d6f-47fc-b5bc-197eee45492e

bksubhuti commented 7 months ago

fixed by ven pndazza