1. 06 May, 2020 7 commits
  2. 05 May, 2020 13 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.
    • Rafał Mikrut's avatar
      Check if pointer is null before using it · c01502c9
      Rafał Mikrut authored
    • Agata Cacko's avatar
      Add context to i18n string in Fill Tool · cae28b09
      Agata Cacko authored
      Before this commit, one of the newly added strings in Fill Tool
      lacked context. This commit adds context to that string.
    • Agata Cacko's avatar
      Fix Fill Tool color label combobox being enabled · 54c86c1c
      Agata Cacko authored
      Before this commit, color label combobox in Fill Tool would be
      enabled in some specific cases, for example after disabling the
      Fast Mode, even though the sampling method would be Current Layer
      or All Layers. This commit fixes that behaviour by making sure
      that the combobox is enabled only if all three are true:
      - Fill Tool doesn't use Fast Mode
      - Fill Tool doesn't fill the entire selection
      - Fill Tool uses the Color Labeled Layers
    • 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.
    • Anna Medonosová's avatar
    • Halla Rempt's avatar
      Delete documents created by libkis directly · 518eea7a
      Halla 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.
      (cherry picked from commit 543565e9cb5d1ddd8fd46bbd65e98e46d059a507)
    • Halla Rempt's avatar
      Add a notify parameter to KisPart::createDocument · 64e4e0fe
      Halla 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
      (cherry picked from commit 7f973f64007637a2d4d175de5a4a2fab33bbc13c)
    • Halla Rempt's avatar
      debug-- · 880f6a65
      Halla Rempt authored
      (cherry picked from commit bc6005f668a7aeca4157c9de4a2f29293f700852)
    • Halla Rempt's avatar
      Fix selecting colors in the stroke selection dialog · 4f2fad4e
      Halla 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.
      (cherry picked from commit 9c8454f3090013b03306f7281a9110ffe75c5f8a)
    • Halla Rempt's avatar
      debug-- · e62fd57c
      Halla Rempt authored
      (cherry picked from commit b3e6596d27bc112cf1591f321ea29a25eedace8d)
    • Halla Rempt's avatar
      Remove useless assert · 804bfda9
      Halla Rempt authored
      (cherry picked from commit e11edf31e43ce0c35f805162a600e9169340f3e8)
    • Emmet O'Neill's avatar
      Fixed bad assertion and failure to undo removeAllAssistants. · 8e3f993a
      Emmet O'Neill authored
      KisAssistantTool::removeAllAssistants function wasn't making correct use
      of EditAssistantsCommand. EditAssistantsCommand also contained a flawed and
      unnecessary assertion.
      Thanks for the help Eoin.
  3. 04 May, 2020 3 commits
  4. 03 May, 2020 2 commits
    • 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
        * 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
      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
    • Scott Petrovic's avatar
      Update splash for 4.3 · 2b1946c8
      Scott Petrovic authored
  5. 01 May, 2020 15 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)
    • 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)
    • 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)
    • 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 418ebf108553dcd037eb01aba837c78257bca276)
    • Mathias Wein's avatar
      Avoid QVector<T> in fast color (De-)Linearization · 28b3314d
      Mathias Wein authored
      Constructing a QVector is expensive, so expensive that it was
      actually slower than the non-fast versions.
      It ranked pretty high in perf and removing it improved HSY'->RGB
      conversion times quite a bit.
      (cherry picked from commit f83ba6560e62be58502b085a281ec8b4dc670a7d)
    • 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
      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)
    • 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.
    • 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.
    • 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
    • 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.
    • 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.
    • 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).
    • 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...
    • 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.
    • 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.