mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Update stashed handle region to only include the handle
Before it included the whole width/height of the view, rather than just the outline where the handle is drawn. Test: Swipe up from a light app on dark wallpaper, ensure handle changes color as soon as the white app background is past halfway through the handle Bug: 193938970 Change-Id: Ic8b83f60976f05b8ff56590422bd9b2fa6140e76
This commit is contained in:
@@ -54,10 +54,14 @@ public class StashedHandleView extends View {
|
||||
R.color.taskbar_stashed_handle_dark_color);
|
||||
}
|
||||
|
||||
public void updateSampledRegion() {
|
||||
/**
|
||||
* Updates mSampledRegion to be the location of the stashedHandleBounds relative to the screen.
|
||||
* @see #getSampledRegion()
|
||||
*/
|
||||
public void updateSampledRegion(Rect stashedHandleBounds) {
|
||||
getLocationOnScreen(mTmpArr);
|
||||
mSampledRegion.set(mTmpArr[0], mTmpArr[1], mTmpArr[0] + getWidth(),
|
||||
mTmpArr[1] + getHeight());
|
||||
mSampledRegion.set(stashedHandleBounds);
|
||||
mSampledRegion.offset(mTmpArr[0], mTmpArr[1]);
|
||||
}
|
||||
|
||||
public Rect getSampledRegion() {
|
||||
|
||||
Reference in New Issue
Block a user