     :background (theme-color :background-fill)
     :stroke 1.0))
 
-(def ^{:private true} NUM_SLICES 20)
-
 (defn- create-init-state
   "create the intitial state with the number of possible steps, width and height of the widget"
-  [num-steps width height]
+  [num-steps num-slices width height]
   {:steps      (vec (repeat num-steps 0))
    :num-steps  num-steps
+   :num-slices num-slices
    :width      width
    :height     height})
 

    c))

(defn stepinator
  [& {:keys [steps width height]
      :or {steps 16 width 300 height 150}}]
  (invoke-now
    (with-error-log "stepinator"
                    (let [state-atom    (atom (create-init-state steps width height))
                          stepinator    (stepinator-panel state-atom)
                          f             (frame :title    "Stepinator"
                                               :content  (border-panel
                                                           :size [width :by height]
                                                           :center stepinator))
                          state-bindable (bind/bind state-atom
                                                    (bind/transform #(:current-value %)))
                          ]
                      (bind/bind state-atom (bind/b-do [_] (repaint! stepinator)))
                      (adjustment-popup :widget f :label "Value:" :bindable state-bindable)
                      (with-meta {:frame (-> f pack! show!)

        x-res         (:num-steps state)
        step-width    (/ w (:num-steps state))
        y             (/ h 2)
        tick-height   (/ h (:num-slices state))
        num-steps    (:num-steps state)
        line-padding  0]

    (draw g (rect 0 0 w h) background-fill)

    (dotimes [i (:num-slices state)]
      (draw g (line 0 (* i tick-height) w (* i tick-height)) background-stroke))

    (dotimes [i num-steps]
