phhusson / treble_app

An app which will do various stuff for Treble ROMs
68 stars 93 forks source link

Rounded corners in dp and in wrong category #23

Open mrgreywater opened 4 years ago

mrgreywater commented 4 years ago

The rounded corners setting is in the headphones category: https://github.com/phhusson/treble_app/blob/5dbc37b347870b53c681a36599222f3a847abf44/app/src/main/res/xml/pref_misc.xml#L64

Also it seems to be in dp instead of physical px, therefore it needs to be adjusted depending on the dpi in the android settings.

If the settings where taken from the user as px, they could be converted to dp with something like

int dp = (int) Math.ceil(getResources().getDisplayMetrics().density * px);

according to https://stackoverflow.com/a/6656774

phhusson commented 4 years ago

Thanks. Would you mind doing a pull request for this?