Posted public instead of here, damn.

Posted public instead of here, damn.

Originally shared by Lutz Linke

Pierre Hébert , I re-uploaded the Excel file to Box with the calculations for Zooper Widget scaling patch:

https://app.box.com/s/hdj5buwi3quqt89rwql9

Here’s the calculations:

Factors (based on LL’s values):

factorW = screenWidth(target) / screenWidth(orig)

factorH = screenHeight(target) / screenHeight(orig)

factorDpi = screenDensity(target) / screenDensity(orig)

Scaling Patch:

preset_widgetwidth(target) = preset_widgetwidth(orig) x factorW

preset_widgetheight(target) = preset_widgetheight(orig) x factorH

pref_widget_scale(target) = (width > height)

   ? pref_widget_scale(orig) x factorH/factorDpi

   : pref_widget_scale(orig) x factorW/factorDpi

preset_dpiheight(target) = preset_dpiheight(orig) x factorH/factorDpi

preset_dpiwidth(target) = preset_dpiwidth(orig) x factorW/factorDpi

The factor for pref_widget_scale seems to depend on the ratio of the widgets, wether it’s narrow of wide.

]]>

Leave a Reply

Your email address will not be published. Required fields are marked *