1. 09 Oct, 2017 5 commits
    • Ell's avatar
      app: allow adding and removing sliders to/from a GimpToolLine · bac7dac4
      Ell authored
      Add support for adding and removing sliders to/from a GimpToolLine,
      using three new signals:
      
        - can-add-slider:  Takes a double argument in the range [0,1],
          indicating a location along the line, and returns a boolean
          value, indicating whether a slider can be added at that
          location.
      
        - add-slider:  Takes a double argument in the range [0,1],
          indicating a location along the line, for which can-add-slider
          returned TRUE.  In response, should add a new slider at that
          location, and return its index, or a negative value if no
          slider was added.
      
        - remove-slider:  Takes a slider index.  In response, may remove
          the slider.
      
      On the UI side, when the cursor is close enough to the line, but
      not within the hit area of an existing handle, GimpToolLine checks
      if a slider can be added at the cursor position, using can-add-
      slider.  If a slider can be added, a dashed circle appears at the
      cursor position along the line, indicating where a slider will be
      added.  The cursor is added by clicking, which emits an add-slider
      signal; if the signal returns a slider index, the new slider is
      selected, and can be subsequently dragged.
      
      Removing a slider is done by either selecting the slider and
      pressing backspace (or delete, although we don't actually forward
      it to the tool atm,) or by "tearing" the slider: when dragging
      the slider, if the cursor is far enough from the liner, a dashed
      circle appears around the slider, and releasing the mouse removes
      the slider.
      bac7dac4
    • Ell's avatar
      app: add keyboard control to GimpToolLine · 63ccbc4f
      Ell authored
      Add support for moving the selected handle using the arrow keys,
      with the same modifiers as GimpToolPath.
      63ccbc4f
    • Ell's avatar
      app: add persistent handle selection to GimpToolLine · d4cb1623
      Ell authored
      En route to on-canvas gradient editing, add support for persistent
      handle selection to GimpToolLine (a handle being either an endpoint
      or a slider).  Handles are selected through clicking, however,
      unlike before, the selection persists after the mouse is released.
      A new "selection" property specifies the currently-selected handle
      (who knows, maybe in the future we'll add multi-selection), and a
      new "selection-changed" signal is emitted when the selection changes.
      
      The visual feedback has been changed to better suit the new behavior,
      and the behaviors yet to be added:  The selected handle is marked
      using highlighting; the highlighting doesn't change while hovering
      over other handles.  Only the hit-test circle is used as hover
      indication, however, we use a fixed-size circle, and only show the
      circle for the currently hovered-over handle -- no more trippy
      expanding circles :)
      
      A few minor changes along the way:
      
        - The selected handle is now the (first) one that's closest to the
          cursor, instead of the first one to pass hit-testing.
      
        - We don't move the selectd handle upon button-press, only upon
          motion, so that handles can be selected without moving them.
      
        - Show a MOVE cursor modifier when hovering over a handle.
      d4cb1623
    • Ell's avatar
      app: rename slider-value variables in GimpToolLine · 042650e1
      Ell authored
      Rename the "t" variables, representing slider values, to "value".
      042650e1
    • Ell's avatar
      app: add gimp_tool_line_get_slider() · fb31a592
      Ell authored
      ... and use it instead of using g_array_index() on the slider array
      directly.
      fb31a592
  2. 30 Jul, 2017 1 commit
    • Ell's avatar
      app: improve GimpToolLine slider motion clamping/constraint · 2d11d291
      Ell authored
      During constrained motion, round the slider value before clamping
      it, so that the slider limits are always enforced.  Additionally,
      snap the slider to 1/12-ths of the line length, rather than
      1/24-ths.
      
      Make sure that sliders can never have negative-zero values, which
      can result in a -inf base for spiral.
      2d11d291
  3. 15 Jul, 2017 1 commit
  4. 04 Jul, 2017 1 commit
  5. 03 Jul, 2017 2 commits
    • Ell's avatar
      app: s/slider_count/n_sliders/ in GimpToolLine and firends · 04b407a0
      Ell authored
      Yep yep yep.
      04b407a0
    • Ell's avatar
      app: add sliders to GimpToolLine; add slider-line controller · 60586a88
      Ell authored
      Add supprt for placing sliders on a GimpToolLine -- handles that can
      be dragged over the line.  The sliders are accesible through a new
      "sliders" property, and via the gimp_tool_line_{get,set}_sliders()
      functions.
      
      Add a slider-line controller, which works like a line controller,
      but whose callback also supplies/takes an array of sliders.
      
      Note that the data type for individual sliders is called
      GimpControllerSlider (in particular, it's not line specific), so
      that we may use it with other controller/tool-widget types in the
      future.
      60586a88
  6. 02 Jul, 2017 1 commit
  7. 26 Jun, 2017 2 commits
  8. 20 Jun, 2017 1 commit
  9. 19 Jun, 2017 1 commit
  10. 16 Jun, 2017 1 commit
  11. 11 Jun, 2017 1 commit
  12. 10 Jun, 2017 1 commit