Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74335

QML RichText table border is misaligned

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.3.0 Alpha
    • 5.12.0, 6.2.0
    • Quick: Other
    • None
    • 899e3d29a70c71f4cbc0c0052b91f7f37f3aabbb (qt/qtdeclarative/dev)

    Description

      In a Text object with RichText format, an HTML table element can be drawn with borders by specifying a nonzero border thickness with a "border" attribute or a "border-width" style. However, when this is done, the coordinates of the bottom and right borders to the entire table are too large by the thickness of the border. Although the "border-collapse" style isn't supported, one can almost accomplish the same thing by setting the table "cellspacing" attribute to the negative of the border thickness, but because of this bug, the bottom and right border of the entire table winds up twice as thick. There is therefore no way to get a perfectly bordered table. This should be an easy one to fix.

      In the attached example (which also shows two other reported bugs), you can see in the first table that the gap between the cell borders and the bottom and right table borders is one pixel larger than the other gaps, because the bottom and right borders are down or to the right too far by one pixel, the specified border thickness. In the second table, the cellspacing is set to the negative of the border thickness to collapse the borders together, but the bottom and right borders aren't properly collapsed because the bottom and right table borders are down or to the right too far by five pixels, the specified border thickness, resulting in double-thick lines.

      Attachments

        1. after-fix.png
          after-fix.png
          41 kB
        2. main.qml
          1 kB
        3. mainqml-after.png
          mainqml-after.png
          11 kB
        4. mainqml-before.png
          mainqml-before.png
          12 kB
        5. table.html
          0.3 kB
        6. test.qml
          0.7 kB
        7. testqml-after.png
          testqml-after.png
          9 kB
        8. testqml-before.png
          testqml-before.png
          9 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-74335
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              pderocco Paul DeRocco
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes