mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Further refinement of all apps / widgets transition
Change-Id: Id107a9aff74f014c07f8cbea6e74951a02dbddab
This commit is contained in:
@@ -126,6 +126,7 @@ public class DeviceProfile {
|
||||
int searchBarSpaceHeightPx;
|
||||
int searchBarHeightPx;
|
||||
int pageIndicatorHeightPx;
|
||||
int allAppsButtonVisualSize;
|
||||
|
||||
float dragViewScale;
|
||||
|
||||
@@ -242,6 +243,18 @@ public class DeviceProfile {
|
||||
// Calculate the remaining vars
|
||||
updateFromConfiguration(context, res, wPx, hPx, awPx, ahPx);
|
||||
updateAvailableDimensions(context);
|
||||
computeAllAppsButtonSize(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the exact visual footprint of the all apps button, taking into account scaling
|
||||
* and internal padding of the drawable.
|
||||
*/
|
||||
private void computeAllAppsButtonSize(Context context) {
|
||||
Resources res = context.getResources();
|
||||
float padding = res.getInteger(R.integer.config_allAppsButtonPaddingPercent) / 100f;
|
||||
LauncherAppState app = LauncherAppState.getInstance();
|
||||
allAppsButtonVisualSize = (int) (hotseatIconSizePx * (1 - padding));
|
||||
}
|
||||
|
||||
void addCallback(DeviceProfileCallbacks cb) {
|
||||
|
||||
Reference in New Issue
Block a user