The AndroWish solution is similar to my provided workaround patch which also considers the tile mode setting.

if {[Widget::theme]} {
  ...
}