1. 06 May, 2020 10 commits
  2. 05 May, 2020 9 commits
    • Agata Cacko's avatar
      Move asserts before usage of a variable · c2ffbc6b
      Agata Cacko authored
      Before this commit, there were two asserts that were checked
      only after both of the variables were used. This means that instead of
      asserting, Krita would crash. It probaby doesn't change much in case of
      Q_ASSERTs (it would be different with asserts that allows recovering)
      but nonetheless, it makes no sense to assert after using a variable.
      This commit moves the asserts above the usage.
      BUG:421076
      c2ffbc6b
    • Rafał Mikrut's avatar
      Check if pointer is null before using it · c01502c9
      Rafał Mikrut authored
      c01502c9
    • Agata Cacko's avatar
      Add context to i18n in fill tool and selection tool · f7514355
      Agata Cacko authored
      Before this commit, translators could be confused what is the string
      about. This commit adds contexts to every translated string so it should
      be clear how to translate it into other languages.
      f7514355
    • Boudewijn Rempt's avatar
      Delete documents created by libkis directly · 518eea7a
      Boudewijn Rempt authored
      Otherwise you will have to wait until the even loop kicks back
      in before the images are really deleted, and that only happens
      after the script is done running.
      
      CCBUG:412740
      (cherry picked from commit 543565e9cb5d1ddd8fd46bbd65e98e46d059a507)
      518eea7a
    • Boudewijn Rempt's avatar
      Add a notify parameter to KisPart::createDocument · 64e4e0fe
      Boudewijn Rempt authored
      When creating a document from libkis' Krita class, we don't want
      the Notifier to go off and create spurious and pretty useless
      documents.
      
      CCBUG:412740
      (cherry picked from commit 7f973f64007637a2d4d175de5a4a2fab33bbc13c)
      64e4e0fe
    • Boudewijn Rempt's avatar
      debug-- · 880f6a65
      Boudewijn Rempt authored
      (cherry picked from commit bc6005f668a7aeca4157c9de4a2f29293f700852)
      880f6a65
    • Boudewijn Rempt's avatar
      Fix selecting colors in the stroke selection dialog · 4f2fad4e
      Boudewijn Rempt authored
      And clean up the code: comparing the translated strings in a
      combobox with untranslated English strings to figure out what
      option was chosen is, of course, a big no-no.
      
      BUG:411482
      (cherry picked from commit 9c8454f3090013b03306f7281a9110ffe75c5f8a)
      4f2fad4e
    • Boudewijn Rempt's avatar
      debug-- · e62fd57c
      Boudewijn Rempt authored
      (cherry picked from commit b3e6596d27bc112cf1591f321ea29a25eedace8d)
      e62fd57c
    • Boudewijn Rempt's avatar
      Remove useless assert · 804bfda9
      Boudewijn Rempt authored
      (cherry picked from commit e11edf31e43ce0c35f805162a600e9169340f3e8)
      804bfda9
  3. 04 May, 2020 1 commit
    • Boudewijn Rempt's avatar
      Check pointers before dereferencing · 98f12880
      Boudewijn Rempt authored
      It shouldn't be possible, but bug 420626 shows that the settings
      object can be zero under some circumstances.
      
      BUG:420626
      (cherry picked from commit 3ca93708da557b034b706340d2b5bf5b2e4c3be0)
      98f12880
  4. 03 May, 2020 1 commit
    • Anna Medonosová's avatar
      Make appimages updateable · 78d8377a
      Anna Medonosová authored
      This merge request is implementing self-update capabilities for
      AppImages inside Krita. Apart from integration of the tools into Krita's
      codebase, there are also updated scripts for AppImage building and icons
      for update channels.
      
      There are multiple parts to this patch:
      
      1. C++ code for integration of AppImageUpdate and changes to previous
      update notifications Both of those options are called Updaters. There
      is:
        * The Manual Updater, which is in fact a fancy name for checking for
      new version on the website and displaying a message to the user together
      with a link to the release notes. This is the original update
      notification code, I have slightly modified version checking and moved
      the code into it's own class.
        * The AppImage Updater, which is used if
      Krita detects that it runs from an AppImage. This updater can actually
      download new version of Krita, if it is available.
      
      2. updated scripts for building appimages I have added code to bundle
      AppImageUpdate into the AppImage being built. Also, the build scripts
      infer the update channel (stable, Beta, Plus or Next) from a combination
      of Krita version and git information. This info is used for setting up
      proper update channel and selecting the right branding option. I have
      also added helper scripts for signing the already built AppImage
      (sign_appimage.sh, generate_zsync.sh; also strip_appimage_signature.sh and
      validate_appimage_signature.sh for debugging purposes) and rewriting
      update information of the built AppImage (update_updinfo.sh).
      
      3. icons for update channels I have added icons I made for myself to
      make sense of all my AppImages. The icons are in krita/pics/branding,
      together with a script for generating all icon sizes from svg
      (generate_icons.sh).
      
      Changes to building - there are two new cmake flags:
      
        * ENABLE_UPDATERS (bool, can be ON or OFF) - this flag toggles all
          updater code, both the appimage updating and update notifications
        * BRANDING (string, can be default, Beta, Plus, or Next) - this flag
          controls which app icons will be installed
      78d8377a
  5. 01 May, 2020 14 commits
    • Mathias Wein's avatar
      Substitute Rec. 2100 PQ profile with linear Rec. 2020 profile · 0b6f52a8
      Mathias Wein authored
      Perceptual quantization (PQ) is just not useful for a
      color selector.
      
      (cherry picked from commit 1e87724bb676357c79ecf82860cd09f61df4bec2)
      0b6f52a8
    • Mathias Wein's avatar
      Adjust the popup palette selector on display renderer changes · 0c2489c6
      Mathias Wein authored
      When the color space of a document or current layer changes,
      the color selector did not react to this.
      
      After a lot of brain racking I came to the conclusion that the
      most sane solution is to make color space changes explicit
      for KisVisualColorSelector, and pass it the original
      foreground color again.
      Changing color space was added to KisColorSelectorInterface too.
      
      More implicit behavior and assumptions about expected outcome
      seem counterproductive at this point.
      
      (cherry picked from commit 7c897c282e3524db8e75ec9f276852c8583e3c1b)
      0c2489c6
    • Mathias Wein's avatar
      Fix tone reproduction curve estimation · 733afddd
      Mathias Wein authored
      The ITUR_2100_PQ_FULL.ICC has no colorants and revealed the bugs.
      Iteration order was inverted so normalization didn't work.
      Also only the first colorant was ever written, and
      consequently the luma coefficients were also incomplete.
      
      Additionally, RGB vs. BGR channel ordering was not respected,
      and the sum of luma coefficients needs to be 1.0 for HSY
      color space calculations.
      
      And while at it, calculate a few more points so the graph in
      the color space browser looks at least somewhat like a curve.
      
      (cherry picked from commit fe47c0619d97e0d727afc9a48c95bf18c4475ddd)
      733afddd
    • Mathias Wein's avatar
      Limit cursor drag in mirror mode elliptic selector shape · 4bca019b
      Mathias Wein authored
      Without any kind of barrier between left and right half,
      it was not really possible to select the min or max value
      as you could in a bar control.
      With this change, the cursor coordinate will be limited
      to the side where mouse dragging started.
      
      (cherry picked from commit 418ebf10)
      4bca019b
    • Mathias Wein's avatar
      Fix HSY selector modes · 3ddebdec
      Mathias Wein authored
      The RGB<=>HSY conversion really only works properly in linear RGB.
      Gamma needs to be applied to Y', and is now taken from Advanced Color Selector
      configuration.
      
      Luma coefficients are now fetched on reconfiguration instead of every single
      color conversion.
      
      Caveat: Some color profiles like "ITUR_2100_PQ_FULL.ICC" define no colorants
      and hence they cannot be linearized with the current implementation.
      A substitution of color spaces like the Small Color Selector does seems
      unavoidable in the long run...
      
      (cherry picked from commit 6a660c25f68396d7fdb9fcce69048b5ee8d4637a)
      3ddebdec
    • Agata Cacko's avatar
      Fix memory leaks in KisMergeLabeledLayersCommand · 66b75ec1
      Agata Cacko authored
      Before this commit, KisMergeLabeledLayersCommand would keep the image
      and paint device for as long as it is kept in the undo stack.
      It's not needed, because the undo uses different ways to determine how
      to undo and redo the selection.
      After this commit at the end of the merge the command will clear its
      shared pointer, which will in turn ensure that those objects will be
      removed when nothing else will be using them.
      66b75ec1
    • Agata Cacko's avatar
      Port Contiguous Selection Tool to strokes · d0efb113
      Agata Cacko authored
      Before this commit, Contiguous Selection Tool would work in GUI thread
      just keeping the image under barrierLock().
      This commit ensures that all the operations happen in a working thread.
      d0efb113
    • Agata Cacko's avatar
      Implement Fill Tool and magic wand on color labeled layers · 7748d8d1
      Agata Cacko authored
      Before this commit, Fill Tool and Contiguous Selection Tool
      would have only two modes: to work on
      a specific layer or to work on a projection of the whole image.
      This commit adds a new mode: working on a set of layers that are
      labeled with a specific color label. The user can choose it in
      Tool Options.
      
      Three modes:
      - current layer
      - all layers
      - color labeled layers - there can be multiple labels selected
      7748d8d1
    • Agata Cacko's avatar
      Fix crash from ProxyStyle in KisColorFilterCombo · f138e606
      Agata Cacko authored
      Before this commit, if the KisColorFilterCombo was used in a widget that
      gets deleted when the canvas gets deleted, Krita would crash because
      the ain (shared) style was supplied to create a proxy style for the
      color filter combobox, hence the main style would be deleted before
      Krita closes. This commit creates a new style and gives the proxy style
      the new one.
      
      Note: giving a null wouldn't work, because then on systems where the
      main style is different from the list that Krita allows, it would look
      wrong. For example I have a light mode on my Cinnamon, it's called
      Mint-X or something similar, and giving a null would mean that the whole
      program is dark, using fusion style, and "Krita dark" theme, and this
      one combobox would use native style, meaning Mint-X, and being very
      light and not fitting the rest of Krita.
      f138e606
    • Dmitry Kazakov's avatar
      Fix double-mirrored dabs when painting with precision < 5 · ae915410
      Dmitry Kazakov authored
      Even though KisDabRenderingQueue returns mutable dabs, it doesn't
      guarantee that they will be unique in the returned list. We should
      be very careful with them and ensure that we don't mirror the same
      paint device twice.
      
      BUG:397831
      ae915410
    • Dmitry Kazakov's avatar
      [NOT FOR 4.3.0] Remove start position from KisRandomAccessor2 · 126608b4
      Dmitry Kazakov authored
      Start posiiton in ctor is not used anywhere, it only causes bugs
      like 395861, because some code passes default value (0,0) to it,
      which extends extent of the paint device, to the area, which is
      not actually modified.
      
      It might also fix some troubles with Transform Tool (not tested).
      
      CCBUG:395861
      126608b4
    • Mathias Wein's avatar
      Fix the fix of Brush HUD · bc7f167b
      Mathias Wein authored
      When the property list was empty, the widget got way too small.
      So better not bypass the top level layout completely, but set a
      minimum size for the scroll area, and wait some more until the
      top level layout recalculated a recommended size.
      
      Things would be easier if QLayout::sizeConstraint had separate
      horizontal and vertical parameters, using SetFixedSize would
      resize before repaint but then we lose control of the height...
      bc7f167b
    • Dmitry Kazakov's avatar
      Fix KisScanlineFill not to tounch point (0,0) on every fill · ab20233c
      Dmitry Kazakov authored
      This patch fixes wery slow application of Magic Wand tool on big images.
      The slowdown happened because KisScanlineFill write-accessed every dst
      device at position (0,0), when initialized random accessors. It resulted
      in dst device extent growing too much, therefore a lot of empty pixels
      had to be porcessed at the later stages of contiguous selection.
      
      CCBUG:395861
      ab20233c
    • Mathias Wein's avatar
      Fix Brush HUD width adjustment · 93bdd1d6
      Mathias Wein authored
      This time hopefully for real.
      There are two issues to bypass:
      
      1) Layouts don't just instantly calculate new dimension as
         you modify them, it would be way too expensive, so Qt has
         a delayed pass for that in the event loop. So we need to
         wait until this has happened for the properties layout
         before resizing.
      2) QScrollArea has a pretty broken sizeHint() implementation.
         It will just not give us a useful size that we could use.
         See also QTBUG-76256 and QTBUG-58447
      
      The most sane solution I could come up with is to install the
      HUD widget as event filter for the content widget of the scroll
      area, and catch the LayoutRequest event. This event gets sent
      by the layout to the parent widget to indicate its new dimension
      are now available.
      This is what Q(Abstract)ScrollArea does internally anyway, so
      even fixing the sizeHint and waiting for the event to trigger
      again on the outer layout just costs another loop iteration
      and results in multiple screen updates.
      
      Since we need to adjust the width a few levels up, we need to
      calculate the margins our self, but the layout is not overly
      complex luckily.
      
      BUG:409661
      93bdd1d6
  6. 30 Apr, 2020 4 commits
  7. 29 Apr, 2020 1 commit