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

QTextDocument should render <hr> in WindowText colour

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.2, 6.6.0 Beta1
    • 6.5.0, 6.5.1
    • None
    • Any platform that supports a Dark Theme
    • All
    • 8a9e3c786 (dev), 0a236d924 (6.5)

    Description

      Problem with QTextDocument.

      If the user sets a "Dark Theme", then <hr> isn't visible because the current default rendering is in a "dark" colour (I think Black).   When a Dark Theme is active this means the <hr> is invisible.

      Instead it should be rendered by default in the colour returned by:

      palette().color(QPalette::ColorRole::WindowText).name()

      so it will be visible regardless of the chosen theme.

      If of course the user sets a background-color in the style for the <hr> that should be used instead.  I've worked round this by using (e.g.):

      insertHtml("<hr style=\"background-color:" + palette().color(QPalette::ColorRole::WindowText).name() + "\">");

      David

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            axelspoerl Axel Spoerl
            perdrix David Partridge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes