Skip to content
Snippets Groups Projects
Commit 3d7d9131 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Tooltips for overlay display, and ortho/lightbox settings panels

parent d76f7418
No related branches found
No related tags found
No related merge requests found
...@@ -9,10 +9,11 @@ import wx ...@@ -9,10 +9,11 @@ import wx
import props import props
import pwidgets.widgetlist as widgetlist import pwidgets.widgetlist as widgetlist
import fsl.data.strings as strings import fsl.data.strings as strings
import fsl.fsleyes.panel as fslpanel import fsl.fsleyes.panel as fslpanel
import fsl.fsleyes.tooltips as fsltooltips
_CANVASPANEL_PROPS = [ _CANVASPANEL_PROPS = [
...@@ -89,7 +90,8 @@ class CanvasSettingsPanel(fslpanel.FSLEyesPanel): ...@@ -89,7 +90,8 @@ class CanvasSettingsPanel(fslpanel.FSLEyesPanel):
self.__widgets.AddWidget( self.__widgets.AddWidget(
widget, widget,
strings.properties[canvasPanel, dispProp.key], displayName=strings.properties[canvasPanel, dispProp.key],
tooltip=fsltooltips.properties[canvasPanel, dispProp.key],
groupName='scene') groupName='scene')
opts = canvasPanel.getSceneOptions() opts = canvasPanel.getSceneOptions()
...@@ -103,7 +105,8 @@ class CanvasSettingsPanel(fslpanel.FSLEyesPanel): ...@@ -103,7 +105,8 @@ class CanvasSettingsPanel(fslpanel.FSLEyesPanel):
self.__widgets.AddWidget( self.__widgets.AddWidget(
widget, widget,
strings.properties[opts, dispProp.key], displayName=strings.properties[opts, dispProp.key],
tooltip=fsltooltips.properties[opts, dispProp.key],
groupName='scene') groupName='scene')
for dispProp in panelProps: for dispProp in panelProps:
...@@ -115,7 +118,8 @@ class CanvasSettingsPanel(fslpanel.FSLEyesPanel): ...@@ -115,7 +118,8 @@ class CanvasSettingsPanel(fslpanel.FSLEyesPanel):
self.__widgets.AddWidget( self.__widgets.AddWidget(
widget, widget,
strings.properties[opts, dispProp.key], displayName=strings.properties[opts, dispProp.key],
tooltip=fsltooltips.properties[opts, dispProp.key],
groupName=panelGroup) groupName=panelGroup)
self.__widgets.Expand('scene') self.__widgets.Expand('scene')
......
...@@ -18,6 +18,7 @@ import pwidgets.widgetlist as widgetlist ...@@ -18,6 +18,7 @@ import pwidgets.widgetlist as widgetlist
import fsl.utils.typedict as td import fsl.utils.typedict as td
import fsl.data.strings as strings import fsl.data.strings as strings
import fsl.fsleyes.tooltips as fsltooltips
import fsl.fsleyes.panel as fslpanel import fsl.fsleyes.panel as fslpanel
import fsl.fsleyes.actions.loadcolourmap as loadcmap import fsl.fsleyes.actions.loadcolourmap as loadcmap
import fsl.fsleyes.displaycontext as displayctx import fsl.fsleyes.displaycontext as displayctx
...@@ -221,7 +222,6 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel): ...@@ -221,7 +222,6 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel):
self.__updateWidgets(display, 'display') self.__updateWidgets(display, 'display')
self.__updateWidgets(opts, 'opts') self.__updateWidgets(opts, 'opts')
self.__widgets.Expand('display', displayExpanded) self.__widgets.Expand('display', displayExpanded)
self.__widgets.Expand('opts', optsExpanded) self.__widgets.Expand('opts', optsExpanded)
...@@ -248,6 +248,8 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel): ...@@ -248,6 +248,8 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel):
dispProps = _DISPLAY_PROPS[target] dispProps = _DISPLAY_PROPS[target]
labels = [strings.properties[target, p.key] for p in dispProps] labels = [strings.properties[target, p.key] for p in dispProps]
tooltips = [fsltooltips.properties.get((target, p.key), None)
for p in dispProps]
widgets = [] widgets = []
...@@ -266,10 +268,11 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel): ...@@ -266,10 +268,11 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel):
widgets.append(widget) widgets.append(widget)
for label, widget in zip(labels, widgets): for label, tooltip, widget in zip(labels, tooltips, widgets):
self.__widgets.AddWidget( self.__widgets.AddWidget(
widget, widget,
label, label,
tooltip=tooltip,
groupName=groupName) groupName=groupName)
self.Layout() self.Layout()
......
...@@ -152,6 +152,8 @@ properties = TypeDict({ ...@@ -152,6 +152,8 @@ properties = TypeDict({
'SceneOpts.showCursor' : 'Show/hide the cursor which highlights ' 'SceneOpts.showCursor' : 'Show/hide the cursor which highlights '
'the current location.', 'the current location.',
'SceneOpts.cursorColour' : 'Colour of the location cursor.',
'SceneOpts.bgColour' : 'Canvas background colour.',
'SceneOpts.showColourBar' : 'If the currently selected overlay is a ' 'SceneOpts.showColourBar' : 'If the currently selected overlay is a '
'volumetric image, show a colour bar ' 'volumetric image, show a colour bar '
'depicting the colour/data display ' 'depicting the colour/data display '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment