1. 31 Jul, 2020 2 commits
    • Laurent Montel's avatar
      Add missing Q_REQUIRED_RESULT · 3ec0456a
      Laurent Montel authored
      3ec0456a
    • Igor Poboiko's avatar
      Grab character format after the link if cursor points at its end · 7c49e82b
      Igor Poboiko authored
      The default QTextEdit behavior is following:
       - the current char format corresponds to the symbol right _before_ the cursor position.
       - if the cursor is at the start of the block, the format is grabbed from the symbol _after_ the cursor.
      
      It works well with standard formatting (bold, underline, etc), which can easily be enabled / disabled using corresponding QActions.
      Note that the behavior is also the same for, say, LibreOffice.
      
      However, it does not work well with hyperlinks. If the document ends with a link, it is virtually impossible
      to start typing normal text right after this link (i.e. to reset the char format). The only way to do it
      is to use copy-paste (i.e. paste some normal text, preserving formatting), which is quite frustrating.
      
      For the same reason it's not easy to write some text right after hyperlink.
      I believe it's the reason behind this tiny whitespace in `insertHtml` inside richTextComposer.
      
      The workaround is following: alter the default behiour and take the character format from symbol right _after_
      the link if the cursor points at the end of the link (this is also the way LibreOffice behaves).
      7c49e82b
  2. 06 Jul, 2020 1 commit
  3. 01 Jul, 2020 1 commit
  4. 10 Jun, 2020 1 commit
  5. 09 Jun, 2020 1 commit
  6. 08 Jun, 2020 2 commits
  7. 07 Jun, 2020 1 commit
  8. 31 May, 2020 1 commit
    • Igor Poboiko's avatar
      Fix "Rescale QImage accordingly" · d53a9063
      Igor Poboiko authored
      Rescale image only when needed (i.e. original image is larger than
      desired). Also, when user don't want to rescale the image at all,
      special values  width == -1 && height == -1 are provided; this case
      should also be covered.
      d53a9063
  9. 30 May, 2020 2 commits
    • Igor Poboiko's avatar
      [RichTextComposerImages] Rescale QImage accordingly · 227f0335
      Igor Poboiko authored
      The width and height are currently used to set properties of
      QTextImageFormat, which then are used to set "width" and "height" html
      properties for img tag, so that rescaling will be done by whoever reads
      generated html. The image itself is not affected.
      By also rescaling the image itself, we can save some space and reduce
      the size of the document
      (e.g.: I tried to add a HD photo of original size 4000x2000, whose base64
      was ~12mb; I resized it to 500x250, and the size reduced to 300kb)
      227f0335
    • Igor Poboiko's avatar
      Don't crash if activateRichText was called before createActions · 7ebe6420
      Igor Poboiko authored
      activateRichText emits textModeChanged signal, which leads to
      richTextComposerActions::textModeChanged call. Which segfaults if table
      actions are not yet created by explicit createActions call.
      7ebe6420
  10. 28 May, 2020 1 commit
  11. 26 May, 2020 1 commit
  12. 25 May, 2020 2 commits
    • Igor Poboiko's avatar
      Add support for QTextBlockFormat::marker · fb117ee6
      Igor Poboiko authored
      This patch enables use of QTextBlockFormat::marker introduced in Qt 5.14.
      Using it, any list element can be marked with interactive checkbox.
      
      It adds a `KToggleAction` with which user can toggle this checkbox.
      
      Brief explanation of the logic:
       - If the cursor is already on a list, we just toggle the marker
       - If the cursor is not on a list, we have to add a list first
         (having a marker without a list just does nothing)
       - If the cursor was on the single-element list, and we have disabled
         the marker, disable the list too.
      fb117ee6
    • Igor Poboiko's avatar
      64344901
  13. 24 May, 2020 1 commit
  14. 12 May, 2020 1 commit
  15. 28 Apr, 2020 1 commit
  16. 20 Apr, 2020 1 commit
  17. 19 Apr, 2020 10 commits
  18. 02 Apr, 2020 1 commit
  19. 24 Mar, 2020 1 commit
  20. 22 Jan, 2020 1 commit
  21. 21 Jan, 2020 2 commits
  22. 01 Jan, 2020 1 commit
  23. 16 Dec, 2019 1 commit
  24. 02 Dec, 2019 1 commit
  25. 24 Sep, 2019 1 commit
  26. 15 Sep, 2019 1 commit