Skip to content

Commit

Permalink
implemented feature wish #150
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenBrinckmann committed Feb 18, 2024
1 parent 151566e commit a373496
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion pasta_eln/GUI/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def __init__(self, comm:Communicate):
# GUI elements
mainL = QVBoxLayout()
mainL.setContentsMargins(space['s'],space['s'],space['0'],space['s'])
mainL.setSpacing(0)
mainL.setSpacing(15)
if self.comm.backend.configuration['GUI']['showProjectBtn']=='Yes':
TextButton('List projects', self, [Command.LIST_PROJECTS], mainL, 'Show list of all projects')
_, self.projectsListL = widgetAndLayout('V', mainL, spacing='s')
# projectListW, self.projectsListL = widgetAndLayout('V', None, spacing='s')
# scrollSection = QScrollArea()
Expand Down Expand Up @@ -147,6 +149,8 @@ def execute(self, command:list[Any]) -> None:
"""
if command[0] is Command.LIST_DOCTYPE:
self.comm.changeTable.emit(command[1], command[2])
elif command[0] is Command.LIST_PROJECTS:
self.comm.changeTable.emit('x0', '')
elif command[0] is Command.SHOW_PROJECT:
projID = command[1]
item = command[2]
Expand Down Expand Up @@ -219,3 +223,4 @@ class Command(Enum):
SHOW_PROJECT = 2
SCAN_PROJECT = 3
SHOW_FOLDER = 4
LIST_PROJECTS= 5
5 changes: 3 additions & 2 deletions pasta_eln/fixedStringsJson.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@
["dark_amber", "dark_blue", "dark_cyan", "dark_lightgreen", "dark_pink", "dark_purple", "dark_red", \
"dark_teal", "dark_yellow", "light_amber", "light_blue", "light_cyan", "light_lightgreen", \
"light_pink", "light_purple", "light_red", "light_teal", "light_yellow", "none"]],
"loggingLevel": ["Logging level (more->less)", "INFO", ["DEBUG", "INFO", "WARNING", "ERROR"]],
"autosave": ["Autosave entries in form", "Yes", ["Yes", "No"]]
"loggingLevel": ["Logging level (more->less)", "INFO", ["DEBUG", "INFO", "WARNING", "ERROR"]],
"autosave": ["Autosave entries in form", "Yes", ["Yes", "No"]],
"showProjectBtn":["Show project button on top-left", "Yes", ["Yes", "No"]]
},
"dimensions": {
"sidebarWidth": ["Sidebar width", 280, [220, 280, 340]],
Expand Down

0 comments on commit a373496

Please sign in to comment.