1. 12 Sep, 2019 4 commits
  2. 10 Sep, 2019 1 commit
  3. 05 Sep, 2019 20 commits
    • Mathias Wein's avatar
      Don't return between QPainter save and restore · 5c326ec1
      Mathias Wein authored
      From Qt docs:
      "A save() must be followed by a corresponding restore();"
      
      So just move the conditional return up by one statement to avoid
      incorrect stack unwinding in KisPaletteDelegate.
      5c326ec1
    • Mathias Wein's avatar
      Add back reworked HDR handling to KisVisualColorSelector · 5d9725e3
      Mathias Wein authored
      The exposure is currently auto-compensated, that means your
      selectable dynamic range changes with exposure.
      
      Also, since it is now possible to tell linear from gamma-curve RGB
      profiles apart, gamma of 2.2 then gets applied by the selector to
      keep that visually even brightness distribution of instead of having
      lighter values dominate the selector space.
      5d9725e3
    • Mathias Wein's avatar
      Implement optimized renderBackground() for elliptical selector shape · 9dbde0d0
      Mathias Wein authored
      Uses a simple integer radius check to skip pixels outside the mask.
      Also do antialiased outline rendering here instead of redoing
      on every cursor movement.
      9dbde0d0
    • Mathias Wein's avatar
      Break up KisVisualColorSelectorShape::getImageMap() · 0cb1e86e
      Mathias Wein authored
      - move rendering of the selector shape background into own function
        called renderBackground()
      - move conversion from KoColor data array to QImage to helper function
        called convertImageMap()
      
      This way it can be better specialized for optimizations.
      0cb1e86e
    • Mathias Wein's avatar
      Move setMask() calls from paintEvent() to resizeEvent() · 3cf5530e
      Mathias Wein authored
      Mask doesn't change otherwise, and it might even be too late to
      apply it without some duplicate rendering.
      
      Also set border width before resize to not force double repaint for
      correct rendering, and don't mimic resize by forcing min/max values.
      3cf5530e
    • Mathias Wein's avatar
      Don't call this->show() in a constructor · 1132b6db
      Mathias Wein authored
      QWidget::show() triggers a resizeEvent() which is a virtual function
      call, which is a really bad idea...
      Instead, make the function that created (possibly) hidden widgets
      to show() them.
      Also, the update() on the children in a resize event was redundant.
      1132b6db
    • Mathias Wein's avatar
      Don't set a minimum height in color selector dialog UI file. · b66c7e32
      Mathias Wein authored
      This makes the embedded layout of KisSpinboxColorSelector try real
      hard to squeeze the spinboxes and labels in this too small height,
      let it instead figure out a minimum height itself from its children.
      b66c7e32
    • Mathias Wein's avatar
      Finally realized why KisVisualRectangleShape behaves weird when non-square · 5f08e170
      Mathias Wein authored
      Some sneaky mix-up of width() and height() in one place caused it.
      
      This should fix the offset issue reported in Bug 381529
      (the rendering part is still needs more work).
      5f08e170
    • Mathias Wein's avatar
      Flip y-coordinate in KisVisualRectangleShape · 8761be68
      Mathias Wein authored
      This is done to match the Advanced Color Selector.
      8761be68
    • Mathias Wein's avatar
      Big KisVisualColorSelector refactor, Part 2 (removing code) · 8d445606
      Mathias Wein authored
      Remove functions and attributes that were put in other classes or
      are no longer required.
      Also fix an oversight of possibly undefined "model" value.
      8d445606
    • Mathias Wein's avatar
      Big KisVisualColorSelector refactor, Part 1 (adding code) · a8958bc9
      Mathias Wein authored
      Basically, this makes KisVisualColorSelectorShape and subclasses as
      dumb as possible and let the selector itself decide how to handle stuff.
      The selector uses raw color model values as much as possible, this
      avoids a number of problems like jumpy handles and unnecessary re-rendering.
      
      - Move code for conversion between color and shape coordinates from
        shape to selector class, along with a number of required class attributes
      - Change mouse event handler to only care about the shape's handle position;
        Handles will now smoothly follow mouse, including movements outside the actual shape.
      - Only re-render the background image when the channels for it changed
      - Get rid of (failed) attempts to compress update signals;
        The selector really should be as smooth as possible IMO, signal compression
        is better done outside of the actual selector (as already done for the dialog)
      
      Note: HDR color ranges are currently not selectable, but it appears
      it was broken anyway, among some things in non-RGB color spaces that still
      need fixing as well.
      a8958bc9
    • Mathias Wein's avatar
      (coding style) make some function const · 5d550a12
      Mathias Wein authored
      5d550a12
    • Mathias Wein's avatar
      Fix widget->shape coordinate conversion of ellipse shape · 963edf29
      Mathias Wein authored
      The shape coordinate of KisVisualEllipticalSelectorShape did
      not stay in 0-1 range for 360° angle component, which breaks later
      color conversions that don't just wrap around.
      963edf29
    • Mathias Wein's avatar
      Don't allocate a QImage that should be overwritten anyway · 98cfd438
      Mathias Wein authored
      Instead, create a black image in case the conversion failed.
      This currently happens in L*a*b color space at certain channel depths.
      98cfd438
    • Mathias Wein's avatar
      Correct size of memory allocation · 11c8d745
      Mathias Wein authored
      11c8d745
    • Mathias Wein's avatar
      Handle coordinates outside of rectangle selector shape · a1ea3e8a
      Mathias Wein authored
      This makes KisVisualRectangleSelectorShape handle mouse positions
      outside of its active area, so the color cursor can easily be moved
      to the edge or corner.
      a1ea3e8a
    • Mathias Wein's avatar
      Some signaling improvements in KisDlgInternalColorSelector: · dad2d742
      Mathias Wein authored
      - actually use the signal compressor to prevent excessive updating,
        so emit the signals in the slot for timeout()
      - slotLockSelector() was just an obfuscated m_d->allowUpdates = false;
        set it explicitly to make it consistent with the rest and remove this slot
      - make sure currentColor is in the proper color space after lockUsedColorSpace(),
        otherwise our input widgets will switch right back when the dialog gets shown
      - fix logic on which update calls to accept/ignore
      dad2d742
    • Mathias Wein's avatar
      Cleanup KisVisualColorSelector signaling a bit: · 9f40b7f9
      Mathias Wein authored
      - connect all shapes to updateFromWidgets()
      - don't emit signals in setColorFromSibling() when we have to
        block them later, signal updates in updateFromWidgets() instead
      - call updateSelectorElements() directly in updateFromWidgets(),
        saves us a check in slotSetColor()
      9f40b7f9
    • Mathias Wein's avatar
      KisVisualColorSelector layout improvements: · 92995858
      Mathias Wein authored
      - Don't use automatic layout for dual-box (CMYK) selector,
        the boxes really don't like to be non-square
      - Don't create empty layout in constructor that we're
        never using before replacing anyway
      - Remove redundant geometry setup, just call resizeEvent()
      92995858
    • Mathias Wein's avatar
      f7ba66c8
  4. 04 Sep, 2019 2 commits
    • Jasper Hartog's avatar
      Add support for fractions with 2 decimals numbers to the FloatColorInput · 7dd0fc4e
      Jasper Hartog authored
      Fractions which resulted in doubles with 2 decimal numbers or less,
      could not be converted. The fraction would only be converted if the
      rounded value differs from the full fraction, which is not the case if
      they are the same.
      
      This check is not needed anymore, since the slider won't trigger the
      input field anymore. Which would result in the early convertion.
      7dd0fc4e
    • Jasper Hartog's avatar
      Stop too early converting of fractions of the FloatColorInput · 0e00519f
      Jasper Hartog authored
      Fix the input field from converting the fractions too early by blocking
      the input field from signals from the slider.
      The slider would trigger the input with a rounded value which resulted
      in the early conversion.
      
      BUG: 409818
      0e00519f
  5. 31 Aug, 2019 1 commit
    • Karl Ove Hufthammer's avatar
      Make HTML markup in search field tooltips work · 8f98f5f7
      Karl Ove Hufthammer authored
      The tooltips for some search text fields (used for example
      in the brush preset widget) used HTML code, but didn’t
      start with an HTML tag, so it was interpreted as plain
      text.
      
      Since the strings had to be changed anyway, this commmit
      also has some other minor improvements to the strings,
      e.g. it removes some unnecessary manual line breaks
      (which caused bad formatting).
      
      The two very similar (and long) strings are also
      ‘deduplicated’, by extracting out their common text to a
      separate string, which makes them easier to translate.
      8f98f5f7
  6. 27 Aug, 2019 1 commit
    • Boudewijn Rempt's avatar
      Remove obsolete checks for versions of Qt < 5.9 · 2769c21c
      Boudewijn Rempt authored
      I also wanted to enable deprecations for newer versions of Qt,
      but what with the removal of QSignalMapper, deprecation of much
      of QDesktopWidget, that's just not feasible -- it'll be a project
      that will take weeks.
      2769c21c
  7. 13 Aug, 2019 1 commit
  8. 22 Jul, 2019 1 commit
  9. 13 Jul, 2019 1 commit
    • Boudewijn Rempt's avatar
      Use QFileInfo::completeBaseName instead of baseName · 14adaa3b
      Boudewijn Rempt authored
      This makes it possible for users to use dots in their filenames.
      Not that that is a good idea, everything after the first dot is
      technically an extensions, as in bla.tar.gz, but Krita doesn't
      handle any file formats where that actually happens, so we can
      be a bit less technically correct when handling filenames and
      only check the extension after the last dot.
      
      BUG:409765
      14adaa3b
  10. 10 Jul, 2019 1 commit
  11. 25 Jun, 2019 1 commit
  12. 21 Jun, 2019 1 commit
  13. 14 Jun, 2019 1 commit
    • Anna Medonosová's avatar
      Fix 'Enforce palette colors' feature · c06107d6
      Anna Medonosová authored
      Since the 'Enforce palette colors' is a feature of the internal color
      selector, this commit moves the functionality from KisPaletteView to
      KisDlgInternalColorSelector. Also, that way the color change is forced
      only once upon foreground color change, preventing cycling signals and confusing color changes
      (KisPaletteView can be used more than once with different color palettes).
      
      Removes KisPaletteView::slotFGColorResourceChanged, the function is
      obsolete: it was meant to solve bug 402072 that is now fixed in a better way.
      
      BACKPORT:krita/4.2
      BUG:408256
      CCBUG:402072
      c06107d6
  14. 12 Jun, 2019 1 commit
  15. 10 Jun, 2019 1 commit
  16. 05 Jun, 2019 1 commit
  17. 27 May, 2019 1 commit