1. 18 Sep, 2018 1 commit
    • Ell's avatar
      app, libgimp*, modules: don't use g_type_class_add_private() ... · 3b0040c0
      Ell authored
      g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
      deprecated in GLib 2.58.  Instead, use
      G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
      foo_get_instance_private() functions, all of which are available in
      the GLib versions we depend on.
      This commit only covers types registered using one of the
      G_DEFINE_FOO() macros (i.e., most types), but not types with a
      custom registration function, of which we still have a few -- GLib
      currently only provides a (non-deprecated) public API for adding a
      private struct using the G_DEFINE_FOO() macros.
      Note that this commit was 99% auto-generated (because I'm not
      *that* crazy :), so if there are any style mismatches... we'll have
      to live with them for now.
  2. 11 Jul, 2018 1 commit
  3. 05 Jun, 2018 3 commits
  4. 11 Feb, 2018 1 commit
  5. 22 Dec, 2017 3 commits
    • Jehan's avatar
      app: also show line info (distance, angle) when moving an endpoint. · 5f00c189
      Jehan authored
      When you move an endpoint in the Blend Tool, angle and distance
      information are especially important, in case you want to draw a
      gradient with specific values.
    • Jehan's avatar
      app: use gimp_display_shell_get_line_status() for GimpToolLine. · e1621c32
      Jehan authored
      Currently Blend tool only shows the vector coordinates whose usefulness
      is a bit of a question. Now it will also show distance (in current shell
      unit) and angle!
    • Ell's avatar
      app: constrain line angles in display space, not image space · 984ed6ce
      Ell authored
      Add an offset_angle parameter to gimp_constrain_line(), which
      offsets the radial lines by a given angle.
      Add gimpdisplayshell-utils.[ch], with two new functions:
        - gimp_display_shell_get_constrained_line_offset_angle():
          Returns the offset angle to be passed to
          gimp_constrain_line(), in order to constrain line angles in
          display space, according to the shell's rotation angle and
          flip mode.
        - gimp_display_shell_constrain_line():  A convenience function
          which calls gimp_constrain_line() with the said offset angle.
      Use the new functions in all instances where we constrain line
      angles, so that angles are constrained in display space, rather
      than image space.
      The only exception is GimpEditSelectionTool, which keeps
      constraining angles in image space, since it's not entirely obvious
      that we want to constrain angles of dragged layers/selections in
      display space.
  6. 09 Oct, 2017 9 commits
    • Ell's avatar
      app: improve status messages of GimpToolLine · 507bc437
      Ell authored
      ... to cover all the new stuff.
    • Ell's avatar
      app: add misc. parameters to GimpControllerSlider · dad521e3
      Ell authored
      Add parameters, controlling the behavior and appearance of sliders,
      to GimpControllerSlider.  The macro GIMP_CONTROLLER_SLIDER_DEFAULT
      expands to a nonmodifiable lvalue of type GimpControllerSlider,
      whose members are initialized with the most common default values.
      Handle the new parameters in GimpToolLine.  A slider using the new
      "autohide" mode is only visible when selected, or when the cursor
      is close enough to the line, between the slider's min and max
      values, and no other handle is grabbed or hovered-over.
    • Ell's avatar
      app: add handle-clicked signal to GimpToolLine · 9e26d7ea
      Ell authored
      ... which is emitted when a handle is single/double/tripple clicked.
      The signal handler returns a boolean value.  A return value of TRUE
      stops further event processing, while a return value of FALSE allows
    • Ell's avatar
      app: add prepare-to-remove-slider signal to GimpToolLine · 50acb669
      Ell authored
      The signal is emitted when a slider is dragged away from the line,
      and will be removed when the button is released, and when the
      slider is dragged back to the vicinity of the line, and won't be
      removed.  The last parameter of the signal is a boolean flag
      differentiating between the two cases.
      Note that a remove-slider signal may be emitted without a preceeding
      prepare-to-remove-slider signal, however, is a prepare-to-remove-
      slider signal is emitted with a TRUE last parameter, it must be
      eventually followed by a remove-slider signal, or by another
      prepare-to-remove-slider signal with a FALSE last parameter.
    • 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
        - 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.
    • 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.
    • 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.
    • Ell's avatar
      app: rename slider-value variables in GimpToolLine · 042650e1
      Ell authored
      Rename the "t" variables, representing slider values, to "value".
    • 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
  7. 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
      Make sure that sliders can never have negative-zero values, which
      can result in a -inf base for spiral.
  8. 15 Jul, 2017 1 commit
  9. 04 Jul, 2017 1 commit
  10. 03 Jul, 2017 2 commits
    • Ell's avatar
      app: s/slider_count/n_sliders/ in GimpToolLine and firends · 04b407a0
      Ell authored
      Yep yep yep.
    • 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()
      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
  11. 02 Jul, 2017 1 commit
  12. 26 Jun, 2017 2 commits
  13. 20 Jun, 2017 1 commit
  14. 19 Jun, 2017 1 commit
  15. 16 Jun, 2017 1 commit
  16. 11 Jun, 2017 1 commit
  17. 10 Jun, 2017 1 commit