Revert "Make sure unpinning is possible"

This reverts commit d5b95d4eee.
This commit is contained in:
M66B 2021-08-12 16:36:39 +02:00
parent d5b95d4eee
commit 783000e229
1 changed files with 3 additions and 5 deletions

View File

@ -910,14 +910,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
private int getDrawerWidth() { private int getDrawerWidth() {
if (!nav_expanded) if (!nav_expanded)
return Helper.dp2pixels(this, 48); // One icon + padding return Helper.dp2pixels(this, 48);
DisplayMetrics dm = getResources().getDisplayMetrics(); DisplayMetrics dm = getResources().getDisplayMetrics();
if (nav_pinned) { if (nav_pinned) {
int minWidth = Helper.dp2pixels(this, 72); // Make sure unpinning is possible int maxWidth = dm.widthPixels - Helper.dp2pixels(this, 300);
int dp300 = Helper.dp2pixels(this, 300); return Math.min(Helper.dp2pixels(this, 300), maxWidth);
int maxWidth = dm.widthPixels - dp300;
return Math.max(Math.min(dp300, maxWidth), minWidth);
} else { } else {
int actionBarHeight; int actionBarHeight;
TypedValue tv = new TypedValue(); TypedValue tv = new TypedValue();