fleather icon indicating copy to clipboard operation
fleather copied to clipboard

Adjusting TextBlockTheme height does not reflect in block type.

Open nialljawad96 opened this issue 1 year ago • 6 comments

Steps to Reproduce

  1. Adjust a TextBlockTheme. E.g.:
  lists: TextBlockTheme(style: const TextStyle(
                                  fontWeight: FontWeight.w400,
                                  height: 1.55,
                                  fontSize: 14
                              ), spacing: VerticalSpacing(

                              ), ),
  1. See how a numbered list does not align with text.
Screenshot 2024-02-03 at 21 50 29

Environment

  • OS: Mac OS
  • Flutter version 3.16.4
  • Fleather version 1.13.2

nialljawad96 avatar Feb 03 '24 21:02 nialljawad96

Thanks for bringing this up. We'll take a look

amantoux avatar Feb 05 '24 13:02 amantoux

@amantoux any news on this Alan?

nialljawad96 avatar Feb 15 '24 12:02 nialljawad96

Sorry for the veery late reply @nialljawad96 will look into this

amantoux avatar Apr 30 '24 16:04 amantoux

@nialljawad96 can you please test on master and tell us if this solves your issue from your point of view? When height is greater than 1 there is still a slight (constant it seems) misalignment that needs to be addressed in a later PR. Feel free to close the issue or leave it open if you deem it necessary to fix the slight misalignment for your use case.

amantoux avatar May 05 '24 15:05 amantoux

@amantoux Sorry for the late reply. For the following themeData:

   lists: TextBlockTheme(style: const TextStyle(
            fontWeight: FontWeight.w400,
            height: 1.55,
            fontSize: 16,
          fontFamily: "inter",
        ), spacing: VerticalSpacing(

        ), ),
        paragraph: TextBlockTheme(style: const TextStyle(
            fontWeight: FontWeight.w400,
            height: 1.55,
            color: Colors.white,
            fontFamily: "inter",
            fontSize: 16
        ), spacing: VerticalSpacing(

        ),

There is still a misalignment:

Screenshot 2024-05-08 at 09 59 11

However, if I reduce the fontSize of the lists theme to 14, the misalignment disappears. I'm doing this for now as a mitigation.

nialljawad96 avatar May 08 '24 09:05 nialljawad96

Thank you @nialljawad96 We'll address that in a later PR

amantoux avatar May 09 '24 19:05 amantoux