1. 26 Jul, 2017 2 commits
    • Eike Ziller's avatar
      Locator: Fix diverse issues with drawing highlighted text · 3841d2fc
      Eike Ziller authored
      To draw the result items with highlighted parts, we split the text to
      draw into "before highlight", "highlight" and "after highlight", and
      painted them separately. This had several issues:
      It breaks the text layout. Characters within a text are often started at
      subpixels, which was not so visible in the static search results, but
      lead to ugly artifacts while typing in Locator (enter a search term, and
      then continue adding characters that still match the first found item,
      and watch the effect in the "after highlight" part).
      It needs a lot of custom painting code. Properly supporting text elide
      modes is hard, scaling to more than one highlight as well. Reusing parts
      of the QItemDelegate base functions also has its issues, e.g. that
      clipping doesn't work well.
      Instead, QItemDelegate::drawDisplay should make it possible to set
      format ranges for the text it draws. This patch copies part of
      QItemDelegate to be able to add this parameter. Unfortunately Qt
      currently has a bug (QTBUG-62019) that character backgrounds are not
      painted far enough (1 pixel to the right has the wrong background), which
      looks very ugly in selected items in the search results. So we use the
      new delegate only for Locator for now, to be used later for the search
      results too, when that bug is fixed.
      Task-number: QTCREATORBUG-18532
      Change-Id: Idf59b2c2bcfa6b188a810f7a3128a81e7e6fffb1
      Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
      Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
      Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
    • Orgad Shaneh's avatar
      GenericHighlighter: Update from KSyntaxHighlighting · 574b9913
      Orgad Shaneh authored
      Mostly whitespace cleanup.
      Change-Id: Ife5831b23d5ee7406ece839f2c1061c9364ac4ad
      Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
  2. 25 Jul, 2017 12 commits
  3. 24 Jul, 2017 22 commits
  4. 23 Jul, 2017 1 commit
  5. 21 Jul, 2017 3 commits