mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 20:06:29 +01:00
Wider navigation menu on extra large screens
This commit is contained in:
@@ -1400,8 +1400,17 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
// Screen width 320 - action bar 56 = 264 dp
|
||||
// Icons 6 x (24 width + 2x6 padding) = 216 dp
|
||||
int drawerWidth = screenWidth - actionBarHeight;
|
||||
int dp320 = Helper.dp2pixels(this, 320);
|
||||
return Math.min(drawerWidth, dp320);
|
||||
|
||||
// https://github.com/flutter/flutter/issues/123380
|
||||
// https://m3.material.io/components/navigation-drawer/specs
|
||||
Configuration config = getResources().getConfiguration();
|
||||
if (config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_XLARGE)) {
|
||||
int dp360 = Helper.dp2pixels(this, 360);
|
||||
return Math.min(drawerWidth, dp360);
|
||||
} else {
|
||||
int dp320 = Helper.dp2pixels(this, 320);
|
||||
return Math.min(drawerWidth, dp320);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user