implement Widget z-index sorting