mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Correct signal for showing contextual buttons for taskbar
Apparently isContextualButtonShowing is not the right signal. Checking on dp.isGestureMode instead Fixes: 300849078 Test: manual Change-Id: Iac44bb4adbbdd5faf52100c88c2a4a6d95d58b98
This commit is contained in:
@@ -471,7 +471,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
/**
|
||||
* @return {@code true} if A11y is showing in 3 button nav taskbar
|
||||
*/
|
||||
private boolean isContextualButtonShowing() {
|
||||
private boolean isA11yButtonPersistent() {
|
||||
return mContext.isThreeButtonNav() && (mState & FLAG_A11Y_VISIBLE) != 0;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
mA11yButton, res, isInKidsMode, isInSetup, isThreeButtonNav,
|
||||
TaskbarManager.isPhoneMode(dp),
|
||||
mWindowManagerProxy.getRotation(mContext));
|
||||
navButtonLayoutter.layoutButtons(dp, isContextualButtonShowing());
|
||||
navButtonLayoutter.layoutButtons(dp, isA11yButtonPersistent());
|
||||
updateNavButtonColor();
|
||||
return;
|
||||
}
|
||||
@@ -838,7 +838,7 @@ public class NavbarButtonsViewController implements TaskbarControllers.LoggableT
|
||||
int contextualWidth = mEndContextualContainer.getWidth();
|
||||
// If contextual buttons are showing, we check if the end margin is enough for the
|
||||
// contextual button to be showing - if not, move the nav buttons over a smidge
|
||||
if (isContextualButtonShowing() && navMarginEnd < contextualWidth) {
|
||||
if (isA11yButtonPersistent() && navMarginEnd < contextualWidth) {
|
||||
// Additional spacing, eat up half of space between last icon and nav button
|
||||
navMarginEnd += res.getDimensionPixelSize(R.dimen.taskbar_hotseat_nav_spacing) / 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user