Edit this page

NA-MIC Project Weeks

Back to Projects List

Updated Icons and Theme switching

Key Investigators

Presenter location: In-person

Project Description

We will be working on integrating new icons, QSS support, and better dynamic theme switching

Objective

  1. Get a working light /dark theme switch for icon sets
  2. Use the newly developed icon set in Slicer
  3. Mov towards using QSS for styling

Approach and Plan

  1. Investigate current methods for swapping out light and dark themes for icons.
  2. Work on putting together a QSS style implementation for the current Slicer Light / Dark themes
  3. Investigate methods of orverrding the existing icon set
  4. Consolidate and icons and remove non-existent icons

Progress and Next Steps

  1. Icon swap approach: External resource binaries
    • Refactor out current resources into an external resource file
    • Dynamically Loaded Resources
    • Load dark vs. light resources at startup
    • Pros
      • Minimal changes to the Slicer core code (still using the resource system)
    • Cons
      • Icons can only be refreshed with a restart
      • Build system will need to generate the rcc file instead of compiling in the resources
      • Will need to add calls to register custom resources for modules and main application
  2. Icon swap progress
    • Created standalone example in test extension
    • Created branch for Slicer with WIP implementations for bundling external resources
    • Setup external resources for loadable modules and libraries
  3. Next steps
    • Work on swapping bundled resources for Python (or an icon picker approach in code)
    • Work on bugs with existing implementation (timing of loading resources for loadable modules, using SVGs as mouse cursors, Transform icon is being stubborn)
    • Review approach with Slicer dev team, mainly when / where the external resources are loaded at runtime, and where they are stored on disk

Illustrations

Example of New icons

image image image

Switching with external resources in test extension

Slicer Dark:

SlicerDarkUpdated

DarkToolBar

Slicer Light:

SlicerLightUpdated

LightToolBar

Background and References