Skip to content

sjh26/SlicerThemes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlicerThemes

3D Slicer extensions for creating and applying qt-material based QSS themes

Screenshot

Applying a theme at startup

# In your .slicerrc.py file
import Themes
logic = Themes.ThemesLogic()

try:
    import qt_material
except:
    logic.installQtMaterial()

templates_list = logic.getAvailableQSSTemplates()
color_list = logic.getAvailableColorFiles()
colorName = 'dark_medical'
color = color_list[colorName]
template_name = 'slicer-material'
template = templates_list[template_name]

print('applying theme: ' + template_name + ' with colors ' + colorName)
logic.applyThemeForSlicer(colors=color, template=template, invert_secondary=False)