Commit 55c6d9bb authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

ENH: new ortho/lightbox option to adjust location cursor width

parent 75c6108d
......@@ -71,6 +71,9 @@ class SliceCanvasOpts(props.HasProperties):
voxel).
"""
cursorWidth = props.Real(minval=0.1, default=1, maxval=10)
"""Width in pixels (approx) of the location cursor. """
zax = props.Choice((0, 1, 2),
alternates=[['x', 'X'], ['y', 'Y'], ['z', 'Z']],
......
......@@ -33,6 +33,7 @@ class SceneOpts(props.HasProperties):
showCursor = copy.copy(canvasopts.SliceCanvasOpts.showCursor)
cursorWidth = copy.copy(canvasopts.SliceCanvasOpts.cursorWidth)
zoom = copy.copy(canvasopts.SliceCanvasOpts.zoom)
bgColour = copy.copy(canvasopts.SliceCanvasOpts.bgColour)
cursorColour = copy.copy(canvasopts.SliceCanvasOpts.cursorColour)
......
......@@ -740,8 +740,8 @@ class LightBoxCanvas(slicecanvas.SliceCanvas):
annot = self.getAnnotations()
kwargs = {
'colour' : opts.cursorColour,
'width' : 1
'colour' : opts.cursorColour,
'lineWidth' : opts.cursorWidth
}
annot.line(*xverts[0], *xverts[1], **kwargs)
......
......@@ -156,6 +156,7 @@ class SliceCanvas:
opts.addListener('displayBounds', self.name, self.Refresh)
opts.addListener('bgColour', self.name, self.Refresh)
opts.addListener('cursorColour', self.name, self.Refresh)
opts.addListener('cursorWidth', self.name, self.Refresh)
opts.addListener('showCursor', self.name, self.Refresh)
opts.addListener('cursorGap', self.name, self.Refresh)
opts.addListener('invertX', self.name, self.Refresh)
......@@ -1160,8 +1161,8 @@ class SliceCanvas:
lines.append((x, yhigh, x, ymax))
kwargs = {
'colour' : copts.cursorColour,
'width' : 1
'colour' : copts.cursorColour,
'lineWidth' : copts.cursorWidth
}
for line in lines:
......
......@@ -104,6 +104,7 @@ class LightBoxPanel(canvaspanel.CanvasPanel):
lbopts.bindProps('bgColour', sceneOpts)
lbopts.bindProps('cursorColour', sceneOpts)
lbopts.bindProps('showCursor', sceneOpts)
lbopts.bindProps('cursorWidth', sceneOpts)
lbopts.bindProps('showGridLines', sceneOpts)
lbopts.bindProps('highlightSlice', sceneOpts)
lbopts.bindProps('highDpi', sceneOpts)
......
......@@ -258,6 +258,10 @@ class OrthoPanel(canvaspanel.CanvasPanel):
yopts.bindProps('cursorGap', sceneOpts)
zopts.bindProps('cursorGap', sceneOpts)
xopts.bindProps('cursorWidth', sceneOpts)
yopts.bindProps('cursorWidth', sceneOpts)
zopts.bindProps('cursorWidth', sceneOpts)
xopts.bindProps('bgColour', sceneOpts)
yopts.bindProps('bgColour', sceneOpts)
zopts.bindProps('bgColour', sceneOpts)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment