Back to Projects List
Transitioning 3D Slicer to QSS Styling
Key Investigators
- Sam Horvath (Kitware)
- J-Christophe Fillion-Robin (Kitware)
- Connor Bowley (Kitware)
- Andras Lasso (Queens)
- Steve Pieper (Isomics)
- Thibault Pelletier
Project Description
Currently 3D Slicer support both QStyle based styling and QtStylesheets. To improve custom apps and user experience, we woud like to move all styling to QSS.
Objective
- Allow users to modify theme colors / add new themes
- Support the existing Slicer Dark / Light themes through QSS
Approach and Plan
- Create QSS files for the existing Slicer Dark / Light themes
- Integrate qt-material package to support Material styles through python
- Create a SlicerThemes (?) extension which pulls in qt-material and add glue code
Progress and Next Steps
- Forked qt-material to address Slicer specific Python interface.
- Created SlicerThemes extension
- Manages installation of Slicer-specific version of qt-material
- Allows for saving and loading of custom color theme files
- Provides QSS templates for styles
- Created QSS templates for “Classic” and “Material” Slicer themes
- These are still WIP
- Next steps
- Allowing for loading of user provided templates in the extension
- Compile list of changes to core code (ctk and Slicer) to allow styles to be set correctly from QSS
Core code changes TBD
- ctkConsole needs tweaks to respect QSS property settings for console colors
- Slice controllers needs work to prevent icons from disappearing
- Icon sets should be updated to a Material style
Illustrations
Initial work
qt-material package out of the box w / light blue theme
qt-material package with some manual tweaks to theme file
Project week results
Background and References
- Discourse post
- qt-material