EasySci commited on
Commit
d3714db
Β·
1 Parent(s): 3291391

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +8 -2
app2.py CHANGED
@@ -25,8 +25,8 @@ paper_list = [] # Add this line to initialize paper_list as an empty list
25
  main_body = [pn.pane.LaTeX("Please select some tags!", styles={'font-size': '20pt'})]
26
 
27
  # Create buttons for the toggleable sidebar
28
- button1 = pn.widgets.Button(name="🏠 Home", button_type='primary', button_style='outline', width=140)
29
- button2 = pn.widgets.Button(name='πŸ“ My papers', button_type='primary', button_style='outline', width=140)
30
  button3 = pn.widgets.Toggle(name='βš™οΈ Settings', button_type='default', button_style='outline', width=140, value=False)
31
 
32
  # Custom RadioButtonGroup widget
@@ -57,6 +57,12 @@ buttons = pn.Column(
57
  def toggle_settings(event):
58
  buttons[-1].visible = event.new
59
 
 
 
 
 
 
 
60
  button3.param.watch(toggle_settings, 'value')
61
 
62
  # List to store the entered options
 
25
  main_body = [pn.pane.LaTeX("Please select some tags!", styles={'font-size': '20pt'})]
26
 
27
  # Create buttons for the toggleable sidebar
28
+ button1 = pn.widgets.Button(name="🏠 Home", button_type='default', button_style='outline', width=140)
29
+ button2 = pn.widgets.Button(name='πŸ“ My papers', button_type='default', button_style='outline', width=140)
30
  button3 = pn.widgets.Toggle(name='βš™οΈ Settings', button_type='default', button_style='outline', width=140, value=False)
31
 
32
  # Custom RadioButtonGroup widget
 
57
  def toggle_settings(event):
58
  buttons[-1].visible = event.new
59
 
60
+ # Set the icon of the "Settings" button based on its value
61
+ if event.new:
62
+ button3.icon = 'βœ…' # Checkmark icon
63
+ else:
64
+ button3.icon = '❌' # "X" icon
65
+
66
  button3.param.watch(toggle_settings, 'value')
67
 
68
  # List to store the entered options