label uses all remaining figure width

This commit is contained in:
2021-05-28 23:30:47 +02:00
parent d1191adcda
commit f523de77eb
+2 -1
View File
@@ -45,7 +45,8 @@ class Director:
def add_header_widgets(fig):
btn = Button(label="🗙", button_type="light", width=35)
lbl = Div(text=fig.name, align="center", style={"font-size": "150%"})
lbl_width = fig.width - btn.width
lbl = Div(text=fig.name, align="center", style={"font-size": "150%"}, width=lbl_width)
res = column(row(btn, lbl), fig, Spacer(height=35))
btn.on_click(lambda: self.remove_plot(res))
return res