1. 31 Jul, 2020 3 commits
    • Laurent Montel's avatar
      Add missing Q_REQUIRED_RESULT · 3ec0456a
      Laurent Montel authored
      3ec0456a
    • Laurent Montel's avatar
      Remove warning · f41e6044
      Laurent Montel authored
      f41e6044
    • 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. 02 Jul, 2020 3 commits
  4. 01 Jul, 2020 5 commits
  5. 22 Jun, 2020 1 commit
  6. 10 Jun, 2020 1 commit
  7. 09 Jun, 2020 2 commits
  8. 08 Jun, 2020 2 commits
  9. 07 Jun, 2020 1 commit
  10. 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
  11. 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
  12. 28 May, 2020 1 commit
  13. 26 May, 2020 2 commits
  14. 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
  15. 24 May, 2020 3 commits
  16. 23 May, 2020 6 commits
  17. 19 May, 2020 1 commit
    • Igor Poboiko's avatar
      Export RichTextEditFindBar headers · 29552a47
      Igor Poboiko authored
      The PlainTextEditFindBar is already exported, just do the same for
      RichTextEditFindBar.
      
      I am currently porting KJots to KPIMTextEdit, as it seems to be much
      nicer compared to KTextWidgets. One of the features I like is inline search,
      which I would like to have both for KJotsEdit (which can be RichTextComposer)
      and KJotsBrowser (which is QTextBrowser). Since QTextBrowser is a
      subclass of QTextEdit, having RichTextEditFindBar there would be useful :)
      29552a47
  18. 12 May, 2020 1 commit
  19. 11 May, 2020 2 commits