test mixin
improve the adapt_dpi method