changed TextInput to Spinner for cache sizes
This commit is contained in:
@ -16,7 +16,7 @@ class Actor:
|
|||||||
self.frm = frm = Frame(plt, cfg)
|
self.frm = frm = Frame(plt, cfg)
|
||||||
self.cache = cache = src.cache.get_view()
|
self.cache = cache = src.cache.get_view()
|
||||||
|
|
||||||
cfg.ti_cache_size.value = str(cache.size)
|
cfg.ti_cache_size.value = cache.size
|
||||||
cfg.ti_cache_size.on_change("value", cb_dbg(self.do_update_cache_size))
|
cfg.ti_cache_size.on_change("value", cb_dbg(self.do_update_cache_size))
|
||||||
|
|
||||||
if isinstance(cfg, ConfigDialog1D): #TODO
|
if isinstance(cfg, ConfigDialog1D): #TODO
|
||||||
@ -42,8 +42,7 @@ class Actor:
|
|||||||
self.cache = None
|
self.cache = None
|
||||||
|
|
||||||
def do_update_cache_size(self, new):
|
def do_update_cache_size(self, new):
|
||||||
self.cache.set_size(int(new))
|
self.cache.set_size(new)
|
||||||
self.cfg.ti_cache_size.value = str(self.cache.size)
|
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
self.plt.set(*self.cache)
|
self.plt.set(*self.cache)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from bokeh.models import TextInput
|
from bokeh.models import Spinner
|
||||||
|
|
||||||
from ..buki import Column
|
from ..buki import Column
|
||||||
|
|
||||||
@ -6,7 +6,7 @@ from ..buki import Column
|
|||||||
class ConfigDialog0D(Column):
|
class ConfigDialog0D(Column):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ti_cache_size = ti_cache_size = TextInput(value="", title="Cache size:")
|
self.ti_cache_size = ti_cache_size = Spinner(title="Cache size:")
|
||||||
super().__init__(ti_cache_size)
|
super().__init__(ti_cache_size)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from bokeh.models import Div, TextInput
|
from bokeh.models import Div, Spinner
|
||||||
|
|
||||||
from ..buki import Column, Row
|
from ..buki import Column, Row
|
||||||
from ..utils import adjust_margin
|
from ..utils import adjust_margin
|
||||||
@ -8,7 +8,7 @@ from ..widgets import Checkbox
|
|||||||
class ConfigDialog1D(Column):
|
class ConfigDialog1D(Column):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ti_cache_size = ti_cache_size = TextInput(value="", title="Cache size:")
|
self.ti_cache_size = ti_cache_size = Spinner(title="Cache size:")
|
||||||
|
|
||||||
self.curves_latest = curves_latest = Checkbox(label="Latest Curve")
|
self.curves_latest = curves_latest = Checkbox(label="Latest Curve")
|
||||||
self.curves_average = curves_average = Checkbox(label="Average Curve")
|
self.curves_average = curves_average = Checkbox(label="Average Curve")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from bokeh.models import Select, Spinner, TextInput
|
from bokeh.models import Select, Spinner
|
||||||
|
|
||||||
from ..buki import Column, Row
|
from ..buki import Column, Row
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ CMAPS = [
|
|||||||
class ConfigDialog2D(Column):
|
class ConfigDialog2D(Column):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ti_cache_size = ti_cache_size = TextInput(value="", title="Cache size:")
|
self.ti_cache_size = ti_cache_size = Spinner(title="Cache size:")
|
||||||
ti_cache_size.disabled = True # 2D plot only shows the latest image
|
ti_cache_size.disabled = True # 2D plot only shows the latest image
|
||||||
self.sel_cmap = sel_cmap = Select(title="Colormap", options=CMAPS)
|
self.sel_cmap = sel_cmap = Select(title="Colormap", options=CMAPS)
|
||||||
self.sp_vmin = sp_vmin = Spinner(title="Minimum Value")
|
self.sp_vmin = sp_vmin = Spinner(title="Minimum Value")
|
||||||
|
Reference in New Issue
Block a user