Revert "Themes: remove unused code"

This reverts commit 6cdc49adc3cb1995d3d1e08e29810ddcc5ab5da3.